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.

A278454 Primes p such that every suffix of the binary representation of p is either a prime or 1.

Original entry on oeis.org

3, 5, 7, 11, 13, 17, 19, 23, 29, 37, 43, 61, 67, 71, 83, 101, 107, 131, 139, 151, 157, 199, 211, 229, 257, 263, 269, 293, 317, 467, 523, 541, 613, 619, 643, 769, 829, 1031, 1061, 1091, 1163, 1181, 1223, 1637, 1667, 2053, 2131, 2179, 2311, 2341, 3079, 3109, 3229, 3271, 4099, 4133, 4139, 4157, 4253, 4637, 8209, 8221, 8263, 8293, 8461, 9283, 9829, 9859
Offset: 1

Views

Author

Randy L. Ekl, Nov 22 2016

Keywords

Examples

			211=11010011_2 is in the sequence, since each of its base-2 suffixes (1010011_2=83, 10011_2=19, 11_2=3, and 1_2=1) is either prime or 1.
		

Crossrefs

Cf. A278455.

Programs

  • Magma
    /* generates b-file through a(1027)=1770887435474165579843 in a couple of seconds */ /* Note: A[j] is a(j-1) */ A:=[1]; for d in [1..70] do for j in [1..#A] do t:=2^d+A[j]; if IsPrime(t) then A[#A+1]:=t; #A-1, A[#A]; end if; end for; end for; // Jon E. Schoenfield, Nov 23 2016
    
  • Mathematica
    First /@ DeleteCases[Map[NestWhileList[# - 2^Floor@ Log2@ # &, #, # > 1 &] &, Prime@ Range[2, 1250]], w_ /; Times @@ Boole[PrimeQ /@ Most@ w] != 1] (* Michael De Vlieger, Nov 22 2016 *)
  • PARI
    red(n)=n-(1<Joerg Arndt, Nov 23 2016