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.

Previous Showing 21-24 of 24 results.

A057659 Prime numbers whose square is composed of just two different decimal digits.

Original entry on oeis.org

5, 7, 11, 109, 173, 81619
Offset: 1

Views

Author

Carlos Rivera, Oct 15 2000

Keywords

Comments

Conjectured to be a finite sequence.
No further terms up to prime(1000000)=15485863. - Harvey P. Dale, Mar 20 2011

Examples

			81619^2 = 6661661161.
		

References

  • Related to the Unsolved problem F24, p. 262, of the UPiNT by R. K. Guy

Crossrefs

Subsequence of A016069.
Cf. A235154.

Programs

  • Maple
    filter:= p -> nops(convert(convert(p^2,base,10),set))= 2:
    select(filter, [seq(ithprime(i),i=1..10^5)]); # Robert Israel, Feb 11 2025
  • Mathematica
    Select[Prime[Range[10000]],Count[DigitCount[#^2],0] ==8&] (* Harvey P. Dale, Mar 20 2011 *)
  • PARI
    select(x->#Set(digits(x^2))==2, primes(10000)) \\ Michel Marcus, Feb 11 2025

A325934 Primes consisting of a single 1 and at least one copy of some other digit.

Original entry on oeis.org

13, 17, 19, 31, 41, 61, 71, 199, 313, 331, 661, 881, 919, 991, 1777, 1999, 2221, 3313, 3331, 4441, 6661, 7177, 7717, 9199, 31333, 33331, 71777, 99991, 199999, 313333, 331333, 333331, 991999, 999199, 3331333, 3333133, 3333313, 3333331, 9999991, 19999999
Offset: 1

Views

Author

Harvey P. Dale, Sep 09 2019

Keywords

Comments

The second Mathematica program below is more complicated than the first but is more efficient. It takes advantage of the observation that any number with a single digit one and one or more copies of another digit from among 2, 4, 5, 6, or 8 can only be prime if the one is the last (least significant) digit. Thus, there is no need to generate or test any permutations of such a number. This means that the program generates and tests only 37.5% as many candidate numbers as the first Mathematica program below. On my laptop computer, in 2019, the first Mathematica program took about 8.2 seconds to compute all terms containing up to 200 digits, whereas the second Mathematica program only took about 6.4 seconds to do the same. - Harvey P. Dale, Sep 20 2019
A further improvement could be made by not testing any permutations of one together with 2, 5, 8, 11, etc. copies of seven, since any such number will have a digital sum of a multiple of three and thus cannot be prime. - Harvey P. Dale, Sep 23 2019

Crossrefs

Subsequence of A208270. Subsequence of A235154.

Programs

  • Mathematica
    Select[Flatten[Table[FromDigits/@Permutations[PadRight[{1},n,k]],{n,10},{k,Range[2,9]}]],PrimeQ]//Union
    Module[{nn=10,c1,c2},c1=Select[Table[FromDigits[PadLeft[{1},n,k]],{k,{2,4,5,6,8}},{n,2,nn}]//Flatten,PrimeQ];c2=Select[FromDigits/@ Flatten[ Permutations/@Flatten[Table[PadLeft[{1},n,k],{k,{3,7,9}},{n,2,nn}],1],1],PrimeQ];Sort[Flatten[Join[{c1,c2}]]]] (* Harvey P. Dale, Sep 20 2019 *)
  • PARI
    lista(nn) = {forprime(p=1, nn, my(d = digits(p)); if ((#Set(d) == 2) && (#select(x->(x==1), d) == 1), print1(p, ", ")););} \\ Michel Marcus, Sep 11 2019

A112750 Smallest prime of the form 7 followed by j copies of the digit k, where j runs through those positive values for which such a prime exists.

Original entry on oeis.org

71, 733, 7333, 79999, 733333, 71111111, 799999999, 79999999999, 79999999999999999999999999, 79999999999999999999999999999999999999999999999999, 733333333333333333333333333333333333333333333333333333, 71111111111111111111111111111111111111111111111111111111
Offset: 1

Views

Author

Amarnath Murthy, Jan 02 2006

Keywords

Comments

For all j > 0, k must be 1, 3, or 9, since a number with --
-- digits 7kk...kk where k is even will be a proper multiple of 2;
-- digits 755...55 will be a proper multiple of 5; and
-- digits 777...77 will be a proper multiple of 7.

Examples

			7333 is a term because it is prime and is 7 followed by three copies of 3, and the numbers 7000, 7111, and 7222 are all nonprime.
From _Jon E. Schoenfield_, Feb 23 2021:  (Start)
Terms begin as follows:
   n   j  k  a(n)
  --  --  -  --------------------------------------------------------
   1   1  1  71
   2   2  3  733
   3   3  3  7333
   4   4  9  79999
   5   5  3  733333
   -   6  - (7111111, 7333333, 7999999 are composite)
   6   7  1  71111111
   7   8  9  799999999
   -   9  - (7111111111, 7333333333, 7999999999 are composite)
   8  10  9  79999999999
   -  11  - (711111111111, 733333333333, 799999999999 are composite)
   -  12  - (all composite)
   -  13  - (all composite)
      ...
   9  25  9  79999999999999999999999999
      ...
  10  49  9  79999999999999999999999999999999999999999999999999
      ...
  11  53  3  733333333333333333333333333333333333333333333333333333
  12  55  1  71111111111111111111111111111111111111111111111111111111
(End)
		

Crossrefs

Subsequence of A090155 and hence A235154.

Programs

  • Mathematica
    SelectFirst[#,PrimeQ]&/@Table[FromDigits[PadRight[{7},n,p]],{n,2,60},{p,{1,3,9}}]/.Missing["NotFound"]->Nothing (* Harvey P. Dale, Apr 19 2021 *)

Extensions

More terms added by Harvey P. Dale, Jan 24 2010
Name corrected (using a suggestion from Felix Fröhlich) and Example edited by Jon E. Schoenfield, May 28 2019
Terms corrected by Jon E. Schoenfield, Feb 23 2021

A242846 Palindromic primes of the form ababa...aba containing only the digits 1 and 3.

Original entry on oeis.org

131, 313, 1313131313131313131313131, 313131313131313131313131313131313131313131313131313
Offset: 1

Views

Author

Felix Fröhlich, May 23 2014

Keywords

Comments

The next two terms both start with 3 and have 83 and 225 digits, respectively. Those are the only other terms with fewer than 352 digits. Cf. A062216.

Crossrefs

Programs

  • Mathematica
    Module[{nn=60,a,b},a=Table[FromDigits[Join[PadRight[{},2n,{1,3}],{1}]],{n,nn}];b=Table[FromDigits[Join[PadRight[{},2n,{3,1}],{3}]],{n,nn}];Select[Sort[Join[a,b]],PrimeQ]] (* Harvey P. Dale, Sep 07 2020 *)
Previous Showing 21-24 of 24 results.