# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a115103 Showing 1-1 of 1 %I A115103 #18 May 08 2022 17:14:11 %S A115103 5,19,29,43,67,89,151,173,197,233,271,283,307,317,349,461,491,569,571, %T A115103 593,653,701,739,751,787,857,859,907,919,1013,1061,1097,1277,1291, %U A115103 1303,1483,1667,1747,1831,1867,1889,1913,1973,2003,2083,2131,2311,2357,2393 %N A115103 Primes p such that p-1 and p+1 have the same number of prime factors with multiplicity. %H A115103 Alois P. Heinz, Table of n, a(n) for n = 1..10000 (first 1000 terms from Vincenzo Librandi) %e A115103 19-1 = 2*3*3 has 3 factors. 19+1 = 2*2*5 has 3 factors. So 19 is in the table. %p A115103 isA115103 := proc(n) %p A115103 if not type(n,prime) then %p A115103 return false; %p A115103 end if; %p A115103 if numtheory[bigomega](n-1) <> numtheory[bigomega](n+1) then %p A115103 false; %p A115103 else %p A115103 true ; %p A115103 end if ; %p A115103 end proc: %p A115103 for n from 2 to 3000 do %p A115103 if isA115103(n) then %p A115103 printf("%d,",n) ; %p A115103 end if; %p A115103 end do: # _R. J. Mathar_, Feb 13 2019 %p A115103 # second Maple program: %p A115103 q:= p-> isprime(p) and (f-> f(p+1)=f(p-1))(numtheory[bigomega]): %p A115103 select(q, [$1..3000])[]; # _Alois P. Heinz_, May 08 2022 %t A115103 Select[Prime[Range[400]],PrimeOmega[#-1]==PrimeOmega[#+1]&] (* _Harvey P. Dale_, Apr 26 2014 *) %o A115103 (PARI) g(n) = forprime(x=1,n,p1=bigomega(x-1);p2=bigomega(x+1);if(p1==p2,print1(x","))) %Y A115103 Cf. A067386 (without multiplicity), A323498, A323536, A323537. %K A115103 easy,nonn %O A115103 1,1 %A A115103 _Cino Hilliard_, Mar 02 2006 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE