login
Number of prime sums in the process described in A226770.
2

%I #9 Jun 25 2013 12:35:31

%S 1,1,1,1,1,1,2,1,3,1,3,1,3,2,3,1,4,1,4,2,5,1,5,1,6,3,7,1,6,1,7,4,7,3,

%T 8,1,9,4,9,1,9,1,9,4,10,1,9,2,10,2,11,1,11,2,13,5,14,1,13,1,12,5,12,5,

%U 13,1,13,6,14,1,14,1,13,6,14,7,15,1,15,3,15

%N Number of prime sums in the process described in A226770.

%H Peter J. C. Moses, <a href="/A226859/b226859.txt">Table of n, a(n) for n = 1..2000</a>

%F a(n) = 1 iff either n = 5 or n + 1 = p or n + 1 = q^2, where p,q and q^2+q-1 are primes.

%e Let n=76. We have 77; d=7,11; 76+7=83 (prime), 76+11=87; d=3,29; 76+3=79(prime), 76+29=105; d=5,15,21,35; 76+5=81, 76+15=91, 76+21=97(prime), 76+35=111; d=9,27,13,37, 76+9=85,76+27=103(prime),76+13=89(prime), 76+37=113(prime), d=17, 76+17=93; d=31, 76+31=107(prime). Thus the set of prime sums is {83,79,97,103,89,113,107} and therefore a(76)=7.

%t Table[(div=Most[Divisors[n+1]]; Count[n+FixedPoint[Union[Flatten[AppendTo[div, Map[Most[Divisors[n+#]]&, #]]]]&, div],_?PrimeQ]),{n,50}] (* _Peter J. C. Moses_, Jun 20 2013 *)

%Y Cf. A226770, A226856, A053184.

%K nonn

%O 1,7

%A _Vladimir Shevelev_, Jun 20 2013

%E More terms from _Peter J. C. Moses_, Jun 20 2013