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-10 of 12 results. Next

A091871 A091633 indexed by A000040.

Original entry on oeis.org

2, 4, 5, 6, 7, 8, 11, 12, 20, 21, 22, 25, 30, 32, 33, 34, 40, 41, 43, 44, 45, 46, 64, 65, 66, 67, 68, 74, 75, 78, 128, 130, 131, 137, 139, 156, 157, 159, 164, 165, 167, 168, 187, 193, 196, 215, 220, 222, 270, 275, 293, 294, 295, 298, 299, 301, 302, 303, 444, 446
Offset: 1

Views

Author

Ray Chandler, Feb 07 2004

Keywords

Crossrefs

Programs

  • Haskell
    a091871 n = a091871_list !! (n-1)
    a091871_list = f [1..] a000040_list where
       f (i:is) (p:ps) = if (null $ show p `intersect` "024568")
                            then i : f is ps else f is ps
    -- Reinhard Zumkeller, Jul 18 2014

Formula

a(n)=k such that A000040(k) = A091633(n).
a(n) = A049084(A091633(n)). - Reinhard Zumkeller, Jul 18 2014

A030096 Primes whose digits are all odd.

Original entry on oeis.org

3, 5, 7, 11, 13, 17, 19, 31, 37, 53, 59, 71, 73, 79, 97, 113, 131, 137, 139, 151, 157, 173, 179, 191, 193, 197, 199, 311, 313, 317, 331, 337, 353, 359, 373, 379, 397, 557, 571, 577, 593, 599, 719, 733, 739, 751, 757, 773, 797, 911, 919, 937, 953, 971, 977, 991
Offset: 1

Views

Author

Keywords

Crossrefs

Intersection of A000040 and A014261. Subsequence of A066640 and hence A014261. Subsequence of A038604. A091633 is a subsequence.
Cf. A076704 = odd-digit prime powers of prime numbers; A091296 = odd-digit semiprimes; A000040 = prime numbers; A001358 = semiprimes.

Programs

  • Haskell
    a030096 n = a030096_list !! (n-1)
    a030096_list = filter f a000040_list where
       f x = odd d && (x < 10 || f x') where (x', d) = divMod x 10
    -- Reinhard Zumkeller, Apr 07 2014, Jan 29 2013
    
  • Magma
    [p: p in PrimesUpTo(1000) | forall{d: d in [0,2,4,6,8] | d notin Set(Intseq(p))}]; // Vincenzo Librandi, Apr 29 2019
  • Mathematica
    Select[Prime[Range[500]],And@@OddQ[IntegerDigits[#]]&] (* Harvey P. Dale, Jan 28 2013 *)
  • PARI
    is(n)=isprime(n) && #setintersect([0,2,4,6,8],Set(digits(n)))==0 \\ Charles R Greathouse IV, Feb 07 2017
    

Extensions

Edited by N. J. A. Sloane at the suggestion of T. D. Noe and Jonathan Vos Post, Sep 15 2007

A068652 Numbers such that every cyclic permutation is a prime.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 31, 37, 71, 73, 79, 97, 113, 131, 197, 199, 311, 337, 373, 719, 733, 919, 971, 991, 1193, 1931, 3119, 3779, 7793, 7937, 9311, 9377, 11939, 19391, 19937, 37199, 39119, 71993, 91193, 93719, 93911, 99371, 193939, 199933, 319993
Offset: 1

Views

Author

Amarnath Murthy, Feb 28 2002

Keywords

Comments

See the closely related sequence A016114 for further information. - N. J. A. Sloane, May 04 2017
These numbers are sometimes called circular primes. - Tanya Khovanova, Jul 29 2024

Examples

			197 is a member as all the three cyclic permutations 197,971,719 are primes.
		

Crossrefs

Programs

  • Mathematica
    fQ[p_] := Module[{b = IntegerDigits[p]}, And @@ Table[PrimeQ[FromDigits[b = RotateLeft[b]]], {Length[b] - 1}]]; Select[Prime[Range[100000]], fQ] (* T. D. Noe, Mar 22 2012 *)
    ecppQ[n_]:=AllTrue[FromDigits/@Table[RotateLeft[IntegerDigits[n],i],{i, IntegerLength[n]}],PrimeQ]; Select[Range[400000],ecppQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Nov 25 2015 *)

Extensions

More terms from Martin Renner, Apr 10 2002

A270083 Near-miss circular primes: Primes p where all but one of the numbers obtained by cyclically permuting the digits of p are prime.

Original entry on oeis.org

19, 23, 29, 41, 43, 47, 53, 59, 61, 67, 83, 89, 101, 103, 107, 127, 149, 157, 163, 173, 181, 191, 271, 277, 307, 313, 317, 331, 359, 367, 379, 397, 419, 479, 491, 571, 577, 593, 617, 631, 673, 701, 709, 727, 739, 757, 761, 787, 797, 811, 839, 877, 907, 911
Offset: 1

Views

Author

Felix Fröhlich, Mar 10 2016

Keywords

Comments

Prime p is a term of the sequence iff A262988(p) = A055642(p) - 1.
If a(512) exists, it is larger than 10^16. - Giovanni Resta, Apr 27 2017
If one of the digits is even or 5, the miss occurs when that digit is permuted to the ones place. Avoiding that simple obstruction, this sequence intersected with A091633 is 19, 173, 191, 313, 317, 331, 379, 397, 739, 797, 911, 937, 977, 1319, 1777, 1913, 1979, 1993, 3191, 3373, 3719, 3733, 3793, ... . Is this an infinite subsequence? - Danny Rorabaugh, May 15 2017

Crossrefs

Programs

A108386 Primes p such that p's set of distinct digits is {1,3,7,9}.

Original entry on oeis.org

1973, 3719, 3917, 7193, 9137, 9173, 9371, 13397, 13799, 13997, 17393, 17939, 19373, 19379, 19739, 19793, 19937, 19973, 31379, 31397, 31793, 31799, 31973, 33179, 33791, 37139, 37199, 37991, 39317, 39371, 39719, 39791, 39971, 71339, 71399
Offset: 1

Views

Author

Rick L. Shepherd, Jun 01 2005

Keywords

Comments

The digits in {1,3,7,9} are the possible ending digits of multidigit primes. [Corrected by Lekraj Beedassy, Apr 04 2009]
Subsequence of A091633. - Michel Marcus, Jun 08 2014

Crossrefs

Cf. A108382 ({1, 3, 7}), A108383 ({1, 3, 9}), A108384 ({1, 7, 9}), A108385 ({3, 7, 9}), A030096 (Primes whose digits are all odd).

A136333 Numbers containing only digits coprime to 10 in their decimal representation.

Original entry on oeis.org

1, 3, 7, 9, 11, 13, 17, 19, 31, 33, 37, 39, 71, 73, 77, 79, 91, 93, 97, 99, 111, 113, 117, 119, 131, 133, 137, 139, 171, 173, 177, 179, 191, 193, 197, 199, 311, 313, 317, 319, 331, 333, 337, 339, 371, 373, 377, 379, 391, 393, 397, 399, 711, 713, 717, 719, 731
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 26 2008

Keywords

Comments

Numbers containing digits 1,3,7,9 only, or, numbers written in base 4 (cf. A007090) with digits mapped by: 0->1, 1->3, 2->7 and 3->9. - Reinhard Zumkeller, Jul 17 2014

Crossrefs

Cf. A007090, A091633 (primes), A245193.

Programs

  • Haskell
    import Data.List (intersect)
    a136333 n = a136333_list !! (n-1)
    a136333_list = filter (null . intersect "024568" . show) [1..]
    -- Reinhard Zumkeller, Jul 17 2014
    
  • Mathematica
    fQ[n_] := Block[{s = {1, 3, 7, 9}}, Union[Join[s, IntegerDigits@ n]] == s]; Select[ Range@ 1000, fQ] (* or *)
    depth = 3; FromDigits@# & /@ FlattenAt[ Table[ Tuples[{1, 3, 7, 9}, n], {n, depth}], {#} & /@ Range[depth]] (* Robert G. Wilson v, Jul 02 2014 *)
  • PARI
    isok(m) = my(d=digits(m)); apply(x->gcd(x, 10), d) == vector(#d, k, 1); \\ Michel Marcus, Feb 25 2022

Formula

Sum_{n>=1} 1/a(n) = 2.395867871130444522329053889312125689319669370758630349552737883715872077555... (calculated using Baillie and Schmelzer's kempnerSums.nb, see Links). - Amiram Eldar, Feb 15 2024

A245193 Smallest prime having in decimal representation A136333(n) as suffix.

Original entry on oeis.org

11, 3, 7, 19, 11, 13, 17, 19, 31, 233, 37, 139, 71, 73, 277, 79, 191, 193, 97, 199, 2111, 113, 1117, 3119, 131, 4133, 137, 139, 1171, 173, 4177, 179, 191, 193, 197, 199, 311, 313, 317, 1319, 331, 2333, 337, 2339, 2371, 373, 2377, 379, 3391, 2393, 397, 1399
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 18 2014

Keywords

Comments

a(n) = A136333(n) iff A136333(n) itself is a prime number, cf. A091633.

Examples

			.    n  |   a(n)  | A136333(n)
. ------+---------+-----------
.   10  |    233  |      33
.   11  |     37  |      37
.   12  |    139  |      39
.   13  |     71  |      71
.   14  |     73  |      73
.   15  |    277  |      77
.   16  |     79  |      79
.   17  |    191  |      91
.   18  |    193  |      93
.   19  |     97  |      97
.   20  |    199  |      99
.   21  |   2111  |     111
.   22  |    113  |     113
.   23  |   1117  |     117
.   24  |   3119  |     119
.   25  |    131  |     131
.   26  |   4133  |     133
.   27  |    137  |     137
.   28  |    139  |     139
.   29  |   1171  |     171
.   30  |    173  |     173 .
		

Crossrefs

Programs

  • Haskell
    import Data.List (isSuffixOf); import Data.Function (on)
    a245193 n = head [p | p <- a000040_list,
                          (isSuffixOf `on` show) (a136333 n) p]
    
  • PARI
    isok(m) = my(d=digits(m)); apply(x->gcd(x, 10), d) == vector(#d, k, 1); \\ A136333
    f(m) = my(p=nextprime(m), s=10^#Str(m)); while ((p-m) % s, p = nextprime(p+1)); p;
    lista(nn) = apply(x->f(x), select(isok, [1..nn]));
    lista(1000) \\ Michel Marcus, Feb 25 2022

A281093 Primes having only {3, 4, 7, 9} as digits.

Original entry on oeis.org

3, 7, 37, 43, 47, 73, 79, 97, 337, 347, 349, 373, 379, 397, 433, 439, 443, 449, 479, 499, 733, 739, 743, 773, 797, 937, 947, 977, 997, 3343, 3347, 3373, 3433, 3449, 3499, 3733, 3739, 3779, 3793, 3797, 3943, 3947, 4337, 4339, 4349, 4373, 4397, 4447, 4493, 4733
Offset: 1

Views

Author

Bobby Jacobs, Jan 24 2017

Keywords

Comments

The Fibonacci prime 433494437 is in this sequence.
These are primes that only use digits that survived in the movie 9: {3, 4, 7, 9}.

Crossrefs

Cf. A091633.

Programs

Formula

a(n) >> n^k, where k = log(10)/log(4) = 1.660964.... - Charles R Greathouse IV, Jan 24 2017

A334050 Lexicographically earliest sequence of distinct positive integers such that the concatenation of any four successive digits forms a prime.

Original entry on oeis.org

1, 2, 3, 7, 19, 31, 9, 13, 73, 33, 137, 39, 311, 93, 11, 931, 91, 37, 331, 373, 313, 733, 191, 3733, 319, 1373, 3137, 333, 1913, 739, 3119, 337, 193, 119, 3191, 3739, 31193, 371, 933, 71, 9311, 9319, 13733, 13739, 31913, 7331, 913, 7333, 19137, 393, 1193, 3719, 3371, 9337, 1931, 1933, 719, 3373
Offset: 1

Views

Author

Eric Angelini and Jean-Marc Falcoz, Sep 06 2020

Keywords

Examples

			The first terms 1, 2, 3, 7, 19, 31, 9,... form (when 4 successive digits are concatenated) the prime numbers 1237, 2371, 3719, 7193, 1931, 9319, ...
		

Crossrefs

Cf. A091633, A337613 (same idea, 2 successive digits), A337614 (3 successive digits).

A368051 Successive primes building the lexicographically earliest k X k 'Futility Squares' (see the Comment and Example sections for more explanations).

Original entry on oeis.org

13, 31, 113, 101, 313, 1117, 1009, 1019, 7993, 11113, 10007, 10009, 10039, 37997, 111119, 100003, 100019, 100129, 101207, 939973, 1111151, 1000003, 1000033, 1000037, 1000099, 5033981, 1337911, 11111117, 10000019, 10000079, 10000103, 10000121, 10011163, 11702641, 79931311
Offset: 1

Views

Author

Keywords

Comments

A k X k 'Futility Square' is a stack of k primes, each one being of length k. The 1st horizontal prime is also the 1st vertical one; the 2nd horizontal prime is also the 2nd vertical one, and so on. The first horizontal prime must be zeroless. The number on the main diagonal (running from top left to bottom right) is also a prime. The k + 1 primes involved in a k X k square must be distinct and the smallest possible not leading to a contradiction.
There might be more than one k X k 'Futility Square' for some k >= 2. For example another such square for k = 2 is
.
6 7
7 1
. - David A. Corneth, Dec 23 2023

Examples

			Here is the lexicographically earliest 3 X 3 'Futility Square':
.
  1 1 3
  1 0 1
  3 1 3
.
We see that 113, 101, 313 and the diagonal 103 are distinct primes.
Hereunder is the lexicographically earliest 6 X 6 'Futility Square':
.
  1 1 1 1 1 9
  1 0 0 0 0 3
  1 0 0 0 1 9
  1 0 0 1 2 9
  1 0 1 2 0 7
  9 3 9 9 7 3
.
We see that 111119, 100003, 100019, 100129, 101207, 939973 and the diagonal 100103 are distinct primes.
The sequence is formed by the two horizontal primes of the 2 X 2 square [13, 31], then the three horizontal primes of the 3 X 3 square [113, 101, 313], then the four horizontal primes of the 4 X 4 square [1117, 1009, 1019, 7993], etc.
		

Crossrefs

Programs

  • PARI
    \\ See PARI link
    
  • Python
    # See Python link

Extensions

a(28)-a(35) for k=8 from Michael S. Branicky, Dec 23 2023
Showing 1-10 of 12 results. Next