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 11-20 of 27 results. Next

A127797 Nextprime(11^n)-11^n.

Original entry on oeis.org

1, 2, 6, 30, 12, 2, 46, 20, 10, 2, 28, 62, 28, 42, 70, 30, 18, 20, 10, 18, 136, 102, 100, 30, 96, 6, 6, 68, 228, 30, 46, 48, 46, 32, 166, 36, 96, 42, 70, 278, 12, 108, 60, 42, 136, 68, 30, 18, 72, 36, 72, 30, 226, 252, 340, 126, 10, 42, 18, 182, 58, 18, 16, 120, 138, 36, 10
Offset: 0

Views

Author

Artur Jasinski, Jan 29 2007

Keywords

Crossrefs

Programs

  • Mathematica
    << NumberTheory`NumberTheoryFunctions` a = {}; Do[k = NextPrime[11^x] - 11^x; AppendTo[a, k], {x, 0, 100}]; a

A127798 Nextprime(12^n)-12^n.

Original entry on oeis.org

1, 1, 5, 5, 7, 7, 7, 25, 5, 31, 49, 31, 35, 25, 23, 11, 17, 29, 47, 103, 7, 5, 7, 23, 133, 19, 5, 13, 7, 215, 89, 5, 53, 89, 17, 35, 257, 29, 19, 193, 13, 121, 79, 71, 53, 61, 287, 61, 107, 125, 5, 203, 23, 119, 89, 5, 95, 61, 7, 29, 191, 211, 119, 31, 377, 37, 49, 89, 161, 5, 785
Offset: 0

Views

Author

Artur Jasinski, Jan 29 2007

Keywords

Crossrefs

Programs

  • Mathematica
    << NumberTheory`NumberTheoryFunctions` a = {}; Do[k = NextPrime[12^x] - 12^x; AppendTo[a, k], {x, 0, 100}]; a
    f[n_]:=Module[{c=12^n},NextPrime[c]-c]; f/@Range[0,100]  (* Harvey P. Dale, Mar 19 2011 *)

A127799 Nextprime(13^n)-13^n.

Original entry on oeis.org

1, 4, 4, 6, 10, 6, 4, 6, 18, 46, 4, 34, 22, 16, 58, 4, 72, 28, 42, 34, 30, 166, 60, 16, 136, 46, 94, 66, 276, 30, 70, 136, 70, 18, 60, 142, 228, 10, 462, 12, 28, 166, 138, 12, 376, 16, 180, 102, 222, 228, 102, 126, 108, 46, 24, 172, 162, 6, 114, 6, 108, 6, 72, 84, 22, 70
Offset: 0

Views

Author

Artur Jasinski, Jan 29 2007

Keywords

Crossrefs

Programs

  • Mathematica
    np13[n_]:=Module[{c=13^n},NextPrime[c]-c]; Array[np13,70,0] (* Harvey P. Dale, Mar 31 2012 *)

A157034 Shorthand for A157033, the smallest prime with 2^n digits.

Original entry on oeis.org

1, 1, 9, 19, 37, 33, 121, 283, 37, 241, 3259, 2823, 67017, 13989, 9523, 34281, 159007
Offset: 0

Views

Author

Lekraj Beedassy, Feb 22 2009

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> (t-> nextprime(t)-t)(10^(2^n-1)):
    seq(a(n), n=0..10);  # Alois P. Heinz, Mar 02 2022
  • Mathematica
    f[n_] := NextPrime[ 10^(2^n-1)] - 10^(2^n-1); Table[ f@n, {n, 0, 12}] (* Robert G. Wilson v, Mar 17 2009 *)
  • Python
    from sympy import nextprime
    def A157034(n): return 1 if n == 0 else nextprime(10**(2**n-1))-10**(2**n-1) # Chai Wah Wu, Apr 16 2021

Formula

a(n) = A157033(n) - 10^(2^n - 1).

Extensions

a(8)-a(12) from Robert G. Wilson v, Mar 17 2009
a(13)-a(14) from Ray Chandler, Mar 22 2009
a(15) from Jinyuan Wang, Feb 24 2022
a(16) from Michael S. Branicky, Jun 18 2024

A096548 Difference between the smallest 10^n-digit prime and 10^(10^n-1).

Original entry on oeis.org

7, 289, 7, 33603, 309403, 593499
Offset: 1

Views

Author

Hugo Pfoertner, Jul 06 2004

Keywords

Comments

Daniel Heuer found a(5) in 2004 by sieving up to 2^33 and then checking ~8000 candidates with pfgw-linux. Proving primality of 10^99999+309403 is beyond current (2004) technology.
a(6) was found by Kenneth Pedersen, Peter Kaiser, and Patrick De Geest. - Charles R Greathouse IV, Feb 11 2013

Examples

			a(1)=7 because the smallest ten-digit prime is 1000000007.
a(2)=289 because the smallest 100-digit prime is 10^99+289.
		

Crossrefs

Cf. A033873.

Formula

a(n) = nextprime(10^(10^n-1)) - 10^(10^n-1) = A007920(10^A002283(n)). - Jeppe Stig Nielsen, Jan 23 2021

A127795 Nextprime(8^n)-8^n.

Original entry on oeis.org

1, 3, 3, 9, 3, 3, 3, 17, 43, 29, 3, 17, 31, 23, 15, 59, 21, 21, 159, 9, 33, 29, 9, 29, 15, 33, 7, 17, 3, 39, 133, 105, 61, 255, 267, 39, 33, 51, 43, 29, 451, 165, 7, 17, 67, 33, 87, 5, 175, 51, 147, 95, 45, 299, 19, 141, 87, 129, 7, 75, 15, 215, 205, 35, 133, 35, 15, 351, 7, 203
Offset: 0

Views

Author

Artur Jasinski, Jan 29 2007

Keywords

Comments

"Nextprime(k)" is not well-defined: it can mean the smallest prime >= k or the smallest prime > k. Of course here it does not matter. - N. J. A. Sloane, Jan 31 2007

Crossrefs

Programs

  • Mathematica
    np[n_]:=Module[{n8=8^n},NextPrime[n8]-n8]; Array[np,70,0] (* Harvey P. Dale, Jun 20 2011 *)

Extensions

Erroneous Mathematica program deleted by Harvey P. Dale, Jun 20 2011

A175038 In the sequence of positive integers A000027, number of digits between successive primes.

Original entry on oeis.org

0, 1, 1, 4, 2, 6, 2, 6, 10, 2, 10, 6, 2, 6, 10, 10, 2, 10, 6, 2, 10, 6, 10, 14, 7, 3, 9, 3, 9, 39, 9, 15, 3, 27, 3, 15, 15, 9, 15, 15, 3, 27, 3, 9, 3, 33, 33, 9, 3, 9, 15, 3, 27, 15, 15, 15, 3, 15, 9, 3, 27, 39, 9, 3, 9, 39, 15, 27, 3, 9, 15, 21, 15, 15, 9, 15, 21, 9, 21, 27, 3, 27, 3, 15, 9, 15
Offset: 1

Views

Author

Zak Seidov, Nov 13 2009

Keywords

Comments

From Jamie Morken, Feb 01 2019: (Start)
For A006880(m) < n < A006880(m+1), a(n) = A046933(n)*(m + 1).
For example m=1, n=24 then a(n)=7*2=14.
For example m=2, n=26 then a(n)=1*3=3.
For n = A006880(m+1), a(n) = A046933(n)*(m+1) + A033873(m + 1).
For example m=1, n=25 then a(n)=3*2+1=7.
(End)

Examples

			a(4) = 4 as prime(4) = 7 and prime(4+1) = 11 so the number of digits between these two primes is the number of digits of 8, 9 and 10. These numbers have 4 digits combined. Therefore a(4) = 4. - _David A. Corneth_, Jan 30 2019
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Flatten[IntegerDigits/@Range[Prime[n]+1,Prime[n+1]-1]]],{n,200}]
  • PARI
    a(n) = sum(k=prime(n)+1, prime(n+1)-1, #Str(k)); \\ Michel Marcus, Jan 30 2019

A118798 Numbers n such that the closest primes surrounding 10^n have the same last two digits.

Original entry on oeis.org

79, 178, 179, 186, 210, 284, 300, 349, 391, 456, 594, 595, 599, 624, 645, 654, 659, 704, 712, 713, 860, 871, 892, 904, 924, 990, 1015, 1089, 1097, 1110, 1118, 1151, 1165, 1374, 1396, 1459, 1709, 1721, 1826, 1831, 1911, 1943, 1956, 2005, 2061, 2082, 2089
Offset: 1

Views

Author

Cino Hilliard, May 23 2006

Keywords

Comments

79 {251, 49}, 178 {239, 261}, 179 {221, 979}, 186 {479, 721}, 210 {171, 1129}, 284 {467, 133}, 300 {69, 331}, 349 {2603, 297}, 391 {123, 477}, 456 {633, 567}, 594 {11, 789}, 595 {503, 297}, 599 {2339, 2161}, 624 {413, 187}, 645 {3291, 109}, 654 {1811, 1089}, 659 {2363, 937}, 704 {3489, 211},
712 {171, 1029}, 713 {801, 2299}, 860 {1193, 2907}, 871 {827, 1473}, 892 {629, 271}, 904 {503, 597}, 924 {303, 4797}, 990 {3, 1197}, 1015 {71, 1029}, 1089 {4403, 5997}, 1097 {2271, 1429}, 1110 {2373, 2527}, 1118 {1767, 2233}, 1151 {2703, 97}, 1165 {33, 3867}, 1374 {689, 1411},
1396 {1023, 3477}, 1459 {10211, 489}, 1709 {2859, 4241}, 1721 {10311, 189}, 1826 {1761, 1539}, 1831 {17751, 1449}, 1911 {4179, 2621}, 1943 {1279, 1721}, 1956 {541, 9459}, 2005 {141, 14259}, 2061 {6607, 3293}, 2082 {9537, 4563}, 2089 {597, 203}, 2091 {2517, 9783}, 2135 {7287, 3513}, ...,.

Examples

			79 is in the sequence since the two primes nearest primes 10^79 are 10^79 - 251 and 10^79 + 49.
		

Crossrefs

Cf. A115564.

Programs

  • Mathematica
    NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ@k, k++ ]; k]; PrevPrim[n_] := Block[{k = n - 1}, While[ !PrimeQ@k, k-- ]; k]; fQ[n_] := Mod[NextPrim[10^n], 100] == Mod[PrevPrim[10^n], 100]; Do[ If[ fQ@n, Print@n], {n, 2, 1250}] (* Robert G. Wilson v, May 27 2006 *)
    Select[Range[2100],Mod[NextPrime[10^#],100]==Mod[NextPrime[10^#,-1],100]&] (* Harvey P. Dale, Mar 09 2019 *)
  • PARI
    g(n) = for(j=1,n,x=precprime(10^j);y=nextprime(10^j);if(x%100==y%100,print1 (j",")))

Formula

A033873 + A033874 == 0 (mod 100). - Robert G. Wilson v, May 27 2006

Extensions

More terms from Robert G. Wilson v, May 27 2006 - Jun 14 2006

A260880 Smallest k such that 1000...0//k (concatenation of 10^n and k) is prime.

Original entry on oeis.org

1, 1, 9, 7, 3, 3, 37, 7, 7, 19, 3, 37, 31, 37, 61, 13, 3, 3, 39, 139, 57, 9, 49, 7, 67, 331, 319, 211, 57, 33, 49, 61, 103, 69, 67, 43, 321, 37, 3, 169, 63, 57, 31, 121, 9, 33, 217, 69, 9, 327, 171, 157, 31, 21, 279, 3, 193, 19, 67, 7, 121, 399, 57, 49, 49, 49
Offset: 0

Views

Author

Felix Fröhlich, Aug 02 2015

Keywords

Examples

			The smallest prime whose decimal expansion starts with 10^6 = 1000000 is 100000037, so a(6) = 37.
		

Crossrefs

Similar to but different from A033873.

Programs

  • PARI
    a(n) = my(k=1); while(!ispseudoprime(eval(Str(10^n, k))), k++); k

A046445 Smallest composite with n prime factors that are distinct in length.

Original entry on oeis.org

1, 22, 2222, 2241998, 22435673986, 2243634705621958, 2243641436526074865874, 22436456994448042654162451606, 2243645856500003226552543739737161242, 2243645872205524222052566325604967420160128694
Offset: 0

Views

Author

Patrick De Geest, Jul 15 1998

Keywords

Crossrefs

Cf. A003617, A033873. Initial terms of A046442, A046443, A046444.

Programs

  • Mathematica
    p = 2; Join[{1}, Table[p = p*Prime[PrimePi[10^n] + 1], {n, 9}]] (* Jayanta Basu, Jun 24 2013 *)

Extensions

Corrected by Jayanta Basu, Jun 24 2013
Previous Showing 11-20 of 27 results. Next