cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A278455 Smallest prime that takes n steps to get to 1, each step reducing the prime by the largest power of 2 possible, with the resultant number a prime.

Original entry on oeis.org

3, 7, 23, 61, 317, 829, 274973, 1844867, 29363357, 275684009603, 2252075497694851, 1155173580104541827, 155838096186773789746819, 649037426474450432457432557949469, 348449144376078413060946030467563206480413
Offset: 1

Views

Author

Randy L. Ekl, Nov 22 2016

Keywords

Examples

			61 is the smallest prime with 4 steps: 61 (-32) -> 29 (-16) -> 13 (-8) -> 5 (-4) -> 1.
23 is the smallest prime with 3 steps: 23 -> 7 -> 3 -> 1
		

Crossrefs

Cf. A278454.

Programs

  • Magma
    a:=[]; A:=[<1,0>]; /* A[j] is a pair: (A278454(j-1) & its no. of steps) */ maxSteps:=0; for d in [1..60] do for j in [1..#A] do t:=2^d+A[j][1]; if IsPrime(t) then A[#A+1]:=; if A[#A][2] gt maxSteps then maxSteps:=A[#A][2]; a[#a+1]:=A[#A][1]; end if; end if; end for; end for; a; //Jon E. Schoenfield, Nov 23 2016
  • Mathematica
    First /@ DeleteDuplicatesBy[#, Last] &@ Map[{First@ #, Length@ # - 1} &, DeleteCases[Map[NestWhileList[# - 2^Floor@ Log2@ # &, #, # > 1 &] &, Prime@ Range[2, 200000]], w_ /; Times @@ Boole[PrimeQ /@ Most@ w] != 1]] (* Michael De Vlieger, Nov 22 2016 *)

Extensions

a(10)-a(15) from Jon E. Schoenfield, Nov 22 2016

A279956 Primes p such that every suffix of the base-4 representation of p is either a prime or 1.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 37, 43, 53, 59, 61, 67, 71, 83, 101, 107, 131, 139, 151, 157, 181, 193, 197, 199, 211, 229, 251, 257, 263, 269, 293, 317, 449, 467, 523, 541, 571, 613, 619, 643, 709, 769, 773, 787, 797, 811, 821, 827, 829, 839, 907, 919, 967, 997, 1019, 1031, 1061
Offset: 1

Views

Author

Randy L. Ekl, Dec 23 2016

Keywords

Examples

			107 is a term in the sequence, since 107_10=1223_4, and 223_4, 23_4 and 3_4 (43_10, 11_10, and 3_10) are all prime.
		

Crossrefs

Cf. A278454 for base 2, A278694 for base 3, A278698 for base 5, and A033664 for base 10.
Also, cf. A278699 for base 4, where the final suffix cannot be 1 (it must be a prime, i.e., 2 or 3).
Showing 1-2 of 2 results.