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.

A056252 Indices of primes in sequence defined by A(0) = 33, A(n) = 10*A(n-1) - 7 for n > 0.

Original entry on oeis.org

5, 7, 893, 1523, 3035, 21155
Offset: 1

Views

Author

Robert G. Wilson v, Aug 18 2000

Keywords

Comments

Numbers n such that (290*10^n + 7)/9 is prime.
Numbers n such that the digit 3 followed by n >= 0 occurrences of the digit 2 followed by the digit 3 is prime.
Numbers corresponding to terms <= 3035 are certified primes.

Examples

			3222223 is prime, hence 5 is a term.
		

References

  • Klaus Brockhaus and Walter Oberschelp, Zahlenfolgen mit homogenem Ziffernkern, MNU 59/8 (2006), pp. 462-467.

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 2000], PrimeQ[(290 10^# + 7) / 9] &] (* Vincenzo Librandi, Nov 03 2014 *)
  • PARI
    a=33;for(n=0,1600,if(isprime(a),print1(n,","));a=10*a-7)
    
  • PARI
    for(n=0,1600,if(isprime((290*10^n+7)/9),print1(n,",")))

Formula

a(n) = A082705(n) - 2.

Extensions

Additional comments from Klaus Brockhaus and Walter Oberschelp (oberschelp(AT)informatik.rwth-aachen.de), Dec 20 2004
Edited by N. J. A. Sloane, Apr 17 2007
More terms from Herman Jamke (hermanjamke(AT)fastmail.fm), Jan 02 2008
Comments section updated and a link added by Patrick De Geest, Nov 02 2014
Edited by Ray Chandler, Nov 05 2014

A375261 Smallest n-digit reversible prime with only prime digits.

Original entry on oeis.org

2, 37, 337, 3257, 32233, 322573, 3222223, 32235223, 322222223, 3222222257, 32222232577, 322222232537, 3222222223333, 32222222332733, 322222222237537, 3222222222223373, 32222222222223353, 322222222222225333, 3222222222222222577, 32222222222222225573, 322222222222222233253
Offset: 1

Views

Author

Jean-Marc Rebert, Aug 08 2024

Keywords

Comments

Differs from A177513(n) for n in A082705. - Robert Israel, May 11 2025

Crossrefs

Programs

  • Maple
    PD:= [2,3,5,7]:
    g:= proc(n) local L,d,i,x,y;
      L:= convert(n,base,4); d:= nops(L);
      x:= add(PD[L[i]+1]*10^(i-1),i=1..d);
      y:= add(PD[L[-i]+1]*10^(i-1),i=1..d);
      if isprime(x) and isprime(y) then return x fi;
    end proc:
    f:= proc(d) local k,v;
      for k from 4^(d-1) do v:= g(k); if v <> NULL then return v fi od
    end proc;
    f(1):= 2:
    map(f, [$1..30]); # Robert Israel, May 11 2025
  • Python
    from sympy import isprime
    from itertools import product
    def a(n):
        if n == 1: return 2
        for first in "37":
            for rest in product("2357", repeat=n-1):
                s = first + "".join(rest)
                if isprime(t:=int(s)) and isprime(int(s[::-1])):
                    return t
    print([a(n) for n in range(1, 22)]) # Michael S. Branicky, Aug 08 2024

Formula

a(n) <= A177513(n) for n > 1.
If a(n) is not a palindrome, a(n) = A177513(n) for n > 1.
Showing 1-2 of 2 results.