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-3 of 3 results.

A266234 Primes representable as f(f(f(...f(p)...))) where p is a prime and f(x) = x*2 - 1.

Original entry on oeis.org

3, 5, 13, 17, 37, 41, 61, 73, 89, 97, 113, 157, 193, 233, 241, 257, 277, 281, 313, 337, 353, 397, 401, 409, 421, 433, 449, 457, 521, 541, 577, 593, 601, 613, 641, 661, 673, 733, 757, 761, 769, 877, 929, 953, 997, 1009, 1049, 1093, 1129, 1153, 1201, 1213, 1237
Offset: 1

Views

Author

Alex Ratushnyak, Dec 25 2015

Keywords

Comments

A005383 is a subsequence: f(x) is applied just once.

Crossrefs

Programs

  • Mathematica
    Take[Union@ Flatten[Table[Nest[2 # - 1 &, Prime@ n, #], {n, 120}] & /@ Range@ 120] /. n_ /; CompositeQ@ n -> Nothing, 53] (* Michael De Vlieger, Jan 06 2016 *)

A266235 Primes representable as f(f(f(...f(p)...))) where p is a prime and f(x) = x^2 + 1.

Original entry on oeis.org

5, 101, 677, 28901, 3422501, 4884101, 260176901, 4784488901, 5887492901, 7370222501, 12898144901, 14498568101, 24840912101, 38514062501, 47563248101, 56249608901, 64014060101, 110842384901, 123657722501, 135755402501, 205145584901, 279343960901, 288680544101
Offset: 1

Views

Author

Alex Ratushnyak, Dec 25 2015

Keywords

Comments

For p>2, f(x) is applied an even number of times, twice at least.

Examples

			a(2) = f(f(3)) = (3^2 + 1)^2 + 1 = 101.
a(3) = f(f(5)) = (5^2 + 1)^2 + 1 = 677.
		

Crossrefs

Programs

  • Mathematica
    Take[Union@ Flatten[Table[Nest[#^2 + 1 &, Prime@ n, #], {n, 150}] & /@ Range@ 6] /. n_ /; CompositeQ@ n -> Nothing, 23] (* Michael De Vlieger, Jan 06 2016 *)
  • Python
    from sympy import isprime
    a=[]
    TOP=1000000
    for p in range(TOP):
        if isprime(p):
            q=p
            while q
    				

A274589 Primes not of the form (prime+1)*2^k-1 with k>=1.

Original entry on oeis.org

2, 3, 13, 17, 19, 29, 37, 41, 43, 53, 61, 67, 73, 89, 97, 101, 103, 109, 113, 131, 137, 139, 149, 157, 163, 173, 181, 193, 197, 199, 211, 229, 233, 241, 251, 257, 269, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 349, 353, 367
Offset: 1

Views

Author

Gionata Neri, Jun 29 2016

Keywords

Comments

A permutation of A057026 (excluding the zeros, e.g., A057026(254601) = 0).

Examples

			103 = (51+1)*2^1-1 = (25+1)*2^2-1 = (12+1)*2^3-1, the numbers 51, 25 and 12 are not primes, so 103 is in the sequence.
71 = (35+1)*2^1-1 = (17+1)*2^2-1 = (8+1)*2^3-1, the number 17 is prime, so 71 is not in the sequence.
		

Crossrefs

Cf. A057026, A266233 (complement with respect to A000040).

Programs

  • Maple
    filter := proc(n) local k;
      if not isprime(n) then return false fi;
      for k from 1 to padic:-ordp(n+1,2) do
         if isprime((n+1)/2^k-1) then return false
         fi
      od:
      true
    end proc:
    select(filter, [2,seq(i,i=3..1000,2)]); # Robert Israel, Jun 29 2016
Showing 1-3 of 3 results.