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 28 results. Next

A062209 Numbers k such that the smoothly undulating palindromic number (4*10^k-7)/33 = 121...21 is a prime (or PRP).

Original entry on oeis.org

7, 11, 43, 139, 627, 1399, 1597, 1979, 7809, 14059, 46499
Offset: 1

Views

Author

Patrick De Geest and Hans Rosenthal (Hans.Rosenthal(AT)t-online.de), Jun 15 2001

Keywords

Comments

Prime versus probable prime status and proofs are given in the author's table.
No further terms < 100000. - Ray Chandler, Aug 17 2011
The corresponding primes, called smoothly undulating palindromic primes (cf. links, A032758 and A059758), are listed in A092696. The number of '12's is given in A056803(n) = (a(n)-1)/2. - M. F. Hasler, Jul 30 2015

Examples

			k=11 --> (12*10^11 - 21)/99 = 12121212121.
		

References

  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 139, p. 48, Ellipses, Paris 2008.

Crossrefs

Programs

  • Mathematica
    d[n_]:=IntegerDigits[n]; Length/@d[Select[NestList[FromDigits[Join[d[#],{2,1}]]&,1,1000],PrimeQ]] (* Jayanta Basu, May 25 2013 *)
  • PARI
    for(n=1,1e5,ispseudoprime(5^n<<(n+2)\33)&&print1(n",")) \\ M. F. Hasler, Jul 30 2015

Extensions

a(11) = 46499 from Ray Chandler, Nov 11 2010
Edited by Ray Chandler, Aug 17 2011
Name and other items edited by M. F. Hasler, Jul 30 2015

A062232 Numbers k such that the smoothly undulating palindromic number (98*10^k - 89)/99 is a prime.

Original entry on oeis.org

9, 161, 219, 4859, 21989, 52931, 88595
Offset: 1

Views

Author

Patrick De Geest and Hans Rosenthal (Hans.Rosenthal(AT)t-online.de), Jun 15 2001

Keywords

Comments

Prime versus probable prime status and proofs are given in the author's table.
No further terms < 100000. - Ray Chandler, Aug 17 2011

Examples

			k=9 -> (98*10^9 - 89)/99 = 989898989.
		

Crossrefs

Extensions

a(6)=52931 from Ray Chandler, Nov 11 2010
a(7)=88595 from Ray Chandler, Jul 23 2011
Edited by Ray Chandler, Aug 17 2011

A059170 Strictly undulating primes (digits alternate and differ by 1).

Original entry on oeis.org

2, 3, 5, 7, 23, 43, 67, 89, 101, 787, 32323, 78787, 1212121, 323232323, 989898989, 12121212121, 32323232323, 787878787878787878787, 787878787878787878787878787, 1212121212121212121212121212121212121212121
Offset: 1

Views

Author

N. J. A. Sloane, Feb 14 2001

Keywords

Comments

Of form ababa... with |a-b| = 1.
The next two terms have 95 and 139 digits respectively. - Jayanta Basu, May 09 2013

References

  • C. A. Pickover, "Keys to Infinity", Wiley 1995, pp. 159-160.
  • C. A. Pickover, "Wonders of Numbers", Oxford New York 2001, Chapter 52, pp. 123-124, 316-317.

Crossrefs

Programs

  • Mathematica
    a[n_]:=DeleteDuplicates[Take[IntegerDigits[n],{1,-1,2}]]; b[n_]:=DeleteDuplicates[Take[IntegerDigits[n],{2,-1,2}]]; t={}; Do[p=Prime[n]; If[p<10, AppendTo[t,p], If[Length[a[p]] == Length[b[p]] == 1 && Abs[a[p][[1]]-b[p][[1]]] == 1, AppendTo[t,p]]], {n,10^5}]; t (* Jayanta Basu, May 08 2013 *)
    t1=Join[{2,3,5,7},Select[Range[10,100],PrimeQ[#]&&Abs[Differences[IntegerDigits[#]]]=={1}&]]; Do[a=n*10+(n-1);b=(n-1)*10+n; t1=Join[t1,Select[Table[(a*10^(2*n+1)-b)/99,{n,25}],PrimeQ]]; If[n<=7,c=n*10+(n+1);d=(n+1)*10+n;t1=Join[t1,Select[Table[(c*10^(2*n+1)-d)/99,{n,25}],PrimeQ]]],{n,1,9,2}]; Sort[t1] (* Jayanta Basu, May 09 2013 *)
     With[{c=Flatten[{#,Reverse[#]}&/@Table[{a,a+1},{a,0,8}],1]},Flatten[ Select[ Table[ FromDigits[PadRight[{},n,#]],{n,50}],PrimeQ]&/@c]]//Union (* Harvey P. Dale, Aug 20 2022 *)

Extensions

Extended by Patrick De Geest, Feb 25 2001
Offset corrected by Arkadiusz Wesolowski, Sep 13 2011

A077799 Numbers m such that a smoothly undulating palindromic prime of the form (rs*10^m-sr)/99 exists, where r and s are two distinct digits and rs and sr denote concatenations of those digits.

Original entry on oeis.org

3, 5, 7, 9, 11, 15, 17, 21, 23, 25, 27, 31, 33, 37, 39, 43, 45, 51, 55, 57, 63, 65, 71, 77, 81, 83, 89, 95, 99, 109, 133, 139, 143, 145, 149, 161, 163, 195, 209, 219, 225, 229, 237, 243, 245, 277, 315, 357, 479, 513, 515, 537, 551, 561, 567, 583, 627, 849, 857
Offset: 1

Views

Author

Patrick De Geest, Nov 16 2002

Keywords

Crossrefs

Extensions

Edited by Ray Chandler, Aug 17 2011
Name clarified by Sean A. Irvine, Jun 14 2025

A343591 Smoothly undulating alternating primes.

Original entry on oeis.org

2, 3, 5, 7, 23, 29, 41, 43, 47, 61, 67, 83, 89, 101, 181, 383, 727, 787, 929, 18181, 32323, 72727, 74747, 78787, 94949, 1212121, 1616161, 323232323, 383838383, 727272727, 929292929, 989898989, 12121212121, 14141414141, 32323232323, 383838383838383, 38383838383838383, 72727272727272727
Offset: 1

Views

Author

Bernard Schott, Apr 21 2021

Keywords

Comments

Equivalently, numbers that are primes, smoothly undulating = in which the digits alternate: ababab... with a <> b (A032758) and alternating = in which parity of the digits alternates (A030144).
Charles W. Trigg was the first to use the word 'smoothly' for these integers.
If we note a(ba) the terms where the substring (ba) is repeated in their decimal expansion, there exist only 16 possibilities with a odd <> 5 and b even <> 0 to get such primes. Indeed, there exist primes of the form 1(21), 1(41), 1(61), 1(81), 3(23), 3(83), 7(27), 7(47), 7(87), 9(29), 9(49), 9(89). There do not exist terms of the form 3(63), 7(67), 9(69), as they are always composite.
Now, what about possible terms of the form 3(43)? If (43) is repeated 3k times, 3(43) is divisible by 3; if (43) is repeated 3k+1 times, 3(43) is divisible by 7; so if such a prime exists, then the substring (43) must be repeated 3k+2 times, but it is not known if such smoothly undulating prime 3(43) exists and if it exists, (43) must be repeated at least 9302 times, so k >= 3100 (link).
Some properties:
-> Every term has two digits or an odd number of digits.
-> All terms with an odd number of digits are palindromic (A059758).
-> Only 2 and the nine 2-digit terms begin with an even digit.

Examples

			1616161 is a term as it is prime and the digits 1 and 6 have odd and even parity and alternate.
		

References

  • Charles W. Trigg, Special Palindromic Primes, Journal of Recreational Mathematics, 4 (July 1971) 169-170.

Crossrefs

Intersection of A030144 and A032758.
Subsequence of A343590.

Programs

  • Maple
    f:= proc(n) local i,a,b,c,d;
      c:= add(10^i,i=1..n-1,2);
      d:= add(10^i,i=0..n-1,2);
      if n = 2 then op(select(isprime,[seq(seq(a*c+b*d, b=[1,3,7,9]),a=[2,4,6,8])]))
        else op(select(isprime, [seq(seq(a*c+b*d, a=[0,2,4,6,8]),b=[1,3,7,9])]))
      fi
    end proc:
    f(1):= (2,3,5,7):
    map(f, [1,2,seq(i,i=3..17,2)]); # Robert Israel, Nov 09 2023
  • Mathematica
    f[o_,e_,n_,m_] := FromDigits @ Riffle[ConstantArray[o,n], ConstantArray[e,n-m]]; seq[n_,m_] := Module[{o = Range[1,9,2], e = Range[0,8,2]}, Select[Union[f @@@ Join[Tuples[{o, e, {n}, {m}}], Tuples[{Rest @ e, o, {n}, {m}}]]], PrimeQ]]; s = seq[1, 1]; Do[s = Join[s, seq[m, Boole[m > 1]]], {m, 1, 10}]; s (* Amiram Eldar, Apr 21 2021 *)
  • Python
    from sympy import isprime
    def agenthru(maxdigits):
      if maxdigits >= 1: yield from [2, 3, 5, 7]
      for digits in [2]*(maxdigits >= 2) + list(range(3, maxdigits+1, 2)):
        hlf, odd = (digits+1)//2, digits%2
        d1range = "1379" if digits%2 == 1 else "123456789"
        d2range = "1379" if digits%2 == 0 else "0123456789"
        for d1 in d1range:
          for d2 in d2range:
            if int(d1)%2 == int(d2)%2: continue
            t = int("".join([*sum(zip(d1*hlf, d2*(digits-hlf)), ())]+[d1*odd]))
            if isprime(t): yield t
    print([p for p in agenthru(17)]) # Michael S. Branicky, Apr 21 2021

A062210 Numbers k such that the smoothly undulating palindromic number (14*10^k - 41)/99 is a prime.

Original entry on oeis.org

11, 277, 479, 583, 1631, 6343, 14689
Offset: 1

Views

Author

Patrick De Geest and Hans Rosenthal (Hans.Rosenthal(AT)t-online.de), Jun 15 2001

Keywords

Comments

Prime versus probable prime status and proofs are given in the author's table.
No further terms < 100000. - Ray Chandler, Aug 17 2011

Examples

			11 is in the sequence because (14*10^11 - 41)/99 = 14141414141 is prime.
		

Crossrefs

Extensions

Edited by Ray Chandler, Aug 17 2011
Name and Example edited by Jon E. Schoenfield, Jun 25 2017

A062216 Numbers k such that the smoothly undulating palindromic number (31*10^k - 13)/99 is a prime.

Original entry on oeis.org

3, 51, 83, 225, 561, 10419, 18255, 43869
Offset: 1

Views

Author

Patrick De Geest and Hans Rosenthal (Hans.Rosenthal(AT)t-online.de), Jun 15 2001

Keywords

Comments

Prime versus probable prime status and proofs are given in the author's table.
No further terms < 100000. - Ray Chandler, Aug 17 2011

Examples

			k=51 -> (31*10^51 - 13)/99 = 313131313131313131313131313131313131313131313131313.
		

Crossrefs

Extensions

43869 from Ray Chandler, Sep 30 2010
Edited by Ray Chandler, Aug 17 2011

A062220 Numbers k such that the smoothly undulating palindromic number (38*10^k - 83)/99 is a prime.

Original entry on oeis.org

3, 9, 15, 17, 21, 57, 4233, 4335, 13221, 26447, 29897, 91997
Offset: 1

Views

Author

Patrick De Geest and Hans Rosenthal (Hans.Rosenthal(AT)t-online.de), Jun 15 2001

Keywords

Comments

Prime versus probable prime status and proofs are given in the author's table.
No further terms < 100000. - Ray Chandler, Aug 17 2011

Examples

			k=21 -> (38*10^21 - 83)/99 = 383838383838383838383.
		

Crossrefs

Extensions

a(12)=91997 from Ray Chandler, Jul 29 2011
Edited by Ray Chandler, Aug 17 2011

A062231 Numbers k such that the smoothly undulating palindromic number (97*10^k - 79)/99 is a prime.

Original entry on oeis.org

9, 27, 45, 237
Offset: 1

Views

Author

Patrick De Geest and Hans Rosenthal (Hans.Rosenthal(AT)t-online.de), Jun 15 2001

Keywords

Comments

Prime versus probable prime status and proofs are given in the author's table.
No further terms < 100000. - Ray Chandler, Aug 17 2011

Examples

			k=27 -> (97*10^27 - 79)/99 = 979797979797979797979797979.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[1,239,2],PrimeQ[FromDigits[PadRight[{},#,{9,7}]]]&] (* Harvey P. Dale, Mar 24 2021 *)

Extensions

Edited by Ray Chandler, Aug 17 2011

A062211 Numbers k such that the smoothly undulating palindromic number (15*10^k - 51)/99 is a prime.

Original entry on oeis.org

3, 15, 63, 89, 245, 583, 1791, 2123, 7233, 24787, 44653
Offset: 1

Views

Author

Patrick De Geest and Hans Rosenthal (Hans.Rosenthal(AT)t-online.de), Jun 15 2001

Keywords

Comments

Prime versus probable prime status and proofs are given in the author's table.
No further terms < 100000. - Ray Chandler, Aug 17 2011

Examples

			k=15 -> (15*10^15 - 51)/99 = 151515151515151.
		

Crossrefs

Extensions

a(11)=44653 from Ray Chandler, Nov 11 2010
Edited by Ray Chandler, Aug 17 2011
Showing 1-10 of 28 results. Next