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

A061247 Primes having only {0, 1, 8} as digits.

Original entry on oeis.org

11, 101, 181, 811, 881, 1181, 1801, 1811, 8011, 8081, 8101, 8111, 10111, 10181, 11801, 18181, 80111, 81001, 81101, 81181, 88001, 88801, 88811, 100801, 100811, 101081, 101111, 108011, 108881, 110881, 118081, 118801, 180001, 180181, 180811
Offset: 1

Views

Author

Amarnath Murthy, Apr 23 2001

Keywords

Comments

The intersection with A007500 is listed in A199328. - M. F. Hasler, Nov 05 2011

Examples

			a(6) = 1801, 1801 is a prime and consists of only 1, 8 and 0.
		

Crossrefs

Programs

  • Magma
    [NthPrime(n): n in [1..2*10^4] | forall{d: d in Intseq(NthPrime(n)) | d in [0, 1, 8]}]; // Vincenzo Librandi, May 15 2019
  • Maple
    N:= 1000: # to get the first N entries
    count:= 0:
    allowed:= {0,1,8}:
    nallowed:= nops(allowed):
    subst:= seq(i=allowed[i+1],i=0..nallowed-1);
    for d from 1 while count < N do
      for x1 from 1 to nallowed-1 while count < N do
        for t from 0 to nallowed^d-1  while count < N do
          L:= subs(subst,convert(x1*nallowed^d+t,base,nallowed));
          X:= add(L[i]*10^(i-1),i=1..d+1);
          if isprime(X) then
              count:= count+1;
              A[count]:= X;
          fi
    od od od:
    seq(A[n],n=1..N); # Robert Israel, Apr 20 2014
  • Mathematica
    Select[Prime[Range[50000]],Length[Union[{0,1,8},IntegerDigits[ # ]]] == 3&] (* Stefan Steinerberger, Jun 10 2007 *)
    Select[FromDigits/@Tuples[{0,1,8},6],PrimeQ] (* Harvey P. Dale, Jan 12 2016 *)
  • PARI
    a(n=50, L=[0, 1, 8], show=0)={my(t); for(d=1, 1e9, u=vector(d, i, 10^(d-i))~; forvec(v=vector(d, i, [1+(i==1 && !L[1]), #L]), ispseudoprime(t=vector(d, i, L[v[i]])*u) || next; show && print1(t", "); n-- || return(t)))} \\ M. F. Hasler, Nov 05 2011
    

Extensions

Corrected and extended by Stefan Steinerberger, Jun 10 2007

A051416 Primes whose digits are composite; primes having only {4, 6, 8, 9} as digits.

Original entry on oeis.org

89, 449, 499, 4649, 4889, 4969, 4999, 6449, 6469, 6689, 6869, 6899, 6949, 8669, 8689, 8699, 8849, 8969, 8999, 9649, 9689, 9949, 44449, 44699, 46489, 46499, 46649, 46889, 48449, 48649, 48869, 48889, 48989, 49499, 49669, 49999, 64489, 64499, 64849, 64969, 66449
Offset: 1

Views

Author

G. L. Honaker, Jr., Jan 17 2000

Keywords

Comments

Primes formed by using only digits 4, 6, 8, 9. Of course, all the terms of this sequence end with 9. - Bernard Schott, Jan 31 2019

Examples

			89 is the smallest composite-digit prime and also the only composite-digit prime whose digits are distinct. - _Bernard Schott_, Jan 31 2019
		

Crossrefs

Cf. A019546 (with prime digits), A030096 (with odd digits), A061246 (with square digits), A061371 (composite numbers with prime digits).
Subsequence of A061372 and of A152313.

Programs

  • Mathematica
    Select[Prime@Range[6500], Intersection[IntegerDigits[ # ], {0, 1, 2, 3, 5, 7}] == {} & ] (* Ray Chandler, Mar 04 2007 *)
    With[{c = {4, 6, 8, 9}}, Array[Select[Map[FromDigits@ Append[#, 9] &, Tuples[c, {#}]], PrimeQ] &, 4]] // Flatten (* Michael De Vlieger, Feb 02 2019 *)

Extensions

Extended by Ray Chandler, Mar 04 2007

A066591 Primes which can be expressed as a concatenation of nonnegative squares.

Original entry on oeis.org

11, 19, 41, 101, 109, 149, 181, 191, 199, 251, 401, 409, 419, 449, 491, 499, 641, 811, 911, 919, 941, 991, 1009, 1019, 1049, 1091, 1109, 1181, 1259, 1289, 1361, 1409, 1481, 1499, 1601, 1609, 1619, 1699, 1811, 1901, 1949, 1999, 2251, 2549, 2591, 3691
Offset: 1

Views

Author

Amarnath Murthy, Dec 21 2001

Keywords

Comments

All terms are == {1,9} mod 10. - Zak Seidov, Jul 16 2015
The surprising prime 162536496481 is the concatenation of the 6 double-digit squares in increasing order (see Prime Curios! link). - Bernard Schott, Nov 19 2020

Examples

			96181 is a term as it is a concatenation of 961 and 81 both of which are squares. 100169 is a term as it is a concatenation of 100 and 169 in one way and also that of 1, 0, 0, 16 and 9 in another way.
		

Crossrefs

A061246 and A167535 are subsequences. - Zak Seidov, Jul 16 2015

Programs

  • Maple
    N:= 10^4: # to get all terms <= N
    catn:= proc(x,y) if y=0 then 10*x else x*10^(ilog10(y)+1)+y fi end proc:
    Sq:= {seq(i^2,i=0..floor(sqrt(N)))}: Agenda:= Sq: S:= Sq:
    while Agenda <> {} do
    Agenda:= select(`<=`,{seq(seq(catn(f,g),f=Agenda),g=Sq)},N) minus S;
    S:= S union Agenda;
    od:
    sort(convert(select(isprime,S),list)); # Robert Israel, Jul 16 2015
  • Python
    from sympy import sieve
    from itertools import count, islice
    def iscat(w, A):
        return False if len(w) < 2 else any(w[:i] in A and (w[i:] in A or iscat(w[i:], A)) for i in range(1, len(w)))
    def agen():
        S = {"0"}
        for d in count(2):
            S |= {str(i*i) for i in range(10**(d-2), 10**(d-1))}
            for p in sieve.primerange(10**(d-1), 10**d):
                if iscat(str(p), S):
                    yield p
    print(list(islice(agen(), 50))) # Michael S. Branicky, Feb 20 2024

Extensions

Corrected and extended by Christopher Lund (clund(AT)san.rr.com), Apr 11 2002

A323387 Primes whose digits are distinct square digits, i.e., consisting of only digits 0, 1, 4, 9.

Original entry on oeis.org

19, 41, 109, 149, 401, 409, 419, 491, 941, 1049, 1409, 4019, 4091, 9041
Offset: 1

Views

Author

Bernard Schott, Jan 13 2019

Keywords

Comments

There are only fourteen terms in this sequence, which is a finite subsequence of A061246.

Examples

			1049 is the smallest prime containing all the square digits exactly once, and 9041 is the largest one.
		

Crossrefs

Subsequence of A061246. Subsequence of A029743.

A107613 Numbers n such that both n and prime(n) consist of square digits (0,1,4,9).

Original entry on oeis.org

94, 1140, 9109, 10404, 10449, 41104, 110000, 110010, 114101, 910140, 910190, 910191, 940111, 940141, 940409, 11049914, 94011001, 94011004, 94019941, 94019990, 94109190, 94109191, 94440910, 190004449, 190011049, 190011090, 190011091, 190011909, 190011999, 190149101
Offset: 1

Views

Author

Zak Seidov, May 17 2005

Keywords

Comments

Corresponding primes are: 491, 9199, 94441, 109441, 109919, 494441, 1441049, 1441199, 1499149, which form a subsequence of A061246 (primes with square digits).

Crossrefs

Cf. A061246.

Programs

  • Mathematica
    Do[id=Union[IntegerDigits[Prime[n]], IntegerDigits[n]];If[Count[id, 2]+Count[id, 3]+Count[id, 5]+Count[id, 6]+Count[id, 7]+Count[id, 8]==0, Print[n]], {n, 200000}]

Extensions

a(10)-a(30) from Chai Wah Wu, Jan 30 2019

A158290 Primes in which a digit is square of another digit.

Original entry on oeis.org

11, 19, 29, 31, 41, 43, 47, 59, 61, 71, 79, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181
Offset: 1

Views

Author

Parthasarathy Nambi, Mar 15 2009

Keywords

Comments

Different from A061246 and A158051.
There are at most 5*x^k primes missing from this sequence up to x, where k = log 6/log 10 = 0.7781.... - Charles R Greathouse IV, Nov 29 2022

Examples

			181 contains two digits which are square of another digit.
		

Crossrefs

A331346 Primes using all the square digits {0, 1, 4, 9} and no others.

Original entry on oeis.org

1049, 1409, 4019, 4091, 9041, 10499, 10949, 14009, 49019, 49109, 90149, 90401, 94109, 99041, 99401, 100049, 101149, 101419, 101449, 104009, 104119, 104149, 104491, 104911, 104999, 109049, 109141, 109441, 110419, 110491, 111049, 111409, 114901, 140009, 140191, 140419
Offset: 1

Views

Author

K. D. Bajpai, Jan 14 2020

Keywords

Comments

Subsequence of A061246.

Examples

			a(1) = 1049 is prime containing all the square digits (0, 1, 4, 9) and no others.
a(2) = 1409 is prime containing all the square digits (0, 1, 4, 9) and no others.
		

Crossrefs

Programs

  • Magma
    [p:p in PrimesUpTo(150000)|Set(Intseq(p)) eq {0,1,4,9}]; // Marius A. Burtea, Jan 14 2020
  • Maple
    f:= proc(n) local L,x;
      L:= convert(n,base,4);
      if convert(L,set) <> {0,1,2,3} then return NULL fi;
      L:= subs(2=4,3=9,L);
      x:= add(L[i]*10^(i-1),i=1..nops(L));
      if isprime(x) then x else NULL fi
    end proc:
    map(f, [$4^3..4^6]); # Robert Israel, Jan 16 2020
  • Mathematica
    Select[FromDigits /@ Tuples[{0, 1, 4, 9}, 6], PrimeQ[#] && Union[IntegerDigits[#]] == {0, 1, 4, 9} &]

A106808 Numbers k such that 4440011 * 10^k - 1 is prime.

Original entry on oeis.org

12, 44, 75, 237, 3186, 4379, 5535, 6363, 13707, 14463
Offset: 1

Views

Author

Jason Earls, May 18 2005

Keywords

Comments

These are primes with square digits and they have all been certified. No more terms up to 37000. Primality proof for the largest: PFGW Version 20041001.Win_Stable (v1.2 RC1b) [FFT v23.8] Primality testing 4440011*10^14463-1 [N+1, Brillhart-Lehmer-Selfridge] Running N+1 test using discriminant 3, base 1+sqrt(3) 4440011*10^14463-1 is prime! (268.8294s+0.0548s)

Crossrefs

Cf. A061246.

Programs

Showing 1-8 of 8 results.