login
Primes in toothpick sequence A153003.
0

%I #13 Feb 24 2021 02:48:18

%S 7,31,127,211,487,571,643,811,1033,1249,1663,1999,2131,2179,2281,2347,

%T 2467,3391,4801,5059,6361,7759,8191,8209,8713,8779,8929,9187,9343,

%U 9679,9931,10687,13903,14947,19009,19267,19423,25057,26731,28879,33289,35521

%N Primes in toothpick sequence A153003.

%H David Applegate, Omar E. Pol and N. J. A. Sloane, <a href="/A000695/a000695_1.pdf">The Toothpick Sequence and Other Sequences from Cellular Automata</a>, Congressus Numerantium, Vol. 206 (2010), 157-191. [There is a typo in Theorem 6: (13) should read u(n) = 4.3^(wt(n-1)-1) for n >= 2.]

%H N. J. A. Sloane, <a href="/wiki/Catalog_of_Toothpick_and_CA_Sequences_in_OEIS">Catalog of Toothpick and Cellular Automata Sequences in the OEIS</a>

%p read("transforms3") ; a139250 := BFILETOLIST("b139250.txt") ; A139250 := proc(n) global a139250; op(n+1,a139250) ; end: A153003 := proc(n) if n =0 then 0; else 1+3/4*(A139250(n+1)-3) ; fi; end: for n from 0 to 400 do p := A153003(n) ; if isprime(p) then printf("%d,",p) ; fi; od: # _R. J. Mathar_, Jul 13 2009

%t a139250 = Cases[Import["https://oeis.org/A139250/b139250.txt", "Table"], {_, _}][[All, 2]];

%t A139250[n_] := a139250[[n + 1]];

%t A153003[n_] := If[n == 0, 0, 1 + 3/4*(A139250[n + 1] - 3)];

%t Reap[Do[p = A153003[n]; If[PrimeQ[p], Sow[p]], {n, 0, 400}]][[2, 1]] (* _Jean-François Alcover_, Apr 05 2020 *)

%Y Cf. A139250, A139253, A152998, A152999, A153000, A153002, A153003, A153006, A153009.

%K nonn

%O 1,1

%A _Omar E. Pol_, Jan 02 2009

%E More terms from _R. J. Mathar_, Jul 13 2009