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

A064214 Least k such that k*5^n +/- 1 are twin primes.

Original entry on oeis.org

4, 6, 6, 24, 42, 42, 18, 198, 42, 54, 96, 84, 522, 240, 48, 228, 708, 732, 660, 132, 528, 390, 78, 1014, 504, 1008, 1134, 504, 708, 582, 894, 516, 2982, 810, 162, 1746, 4758, 1848, 414, 4512, 2928, 1722, 4392, 1104, 1134, 1950, 390, 78, 1500, 300, 60
Offset: 0

Views

Author

Robert G. Wilson v, Sep 21 2001

Keywords

Crossrefs

Cf. A063983.

Programs

  • Mathematica
    Do[ k = 1; While[ ! PrimeQ[ k*5^n + 1 ] || ! PrimeQ[ k*5^n - 1 ], k++ ]; Print[ k ], {n, 0, 50} ]

Extensions

Offset corrected by Georg Fischer, May 01 2022

A124520 Numbers k such that 14*k - 1 and 14*k + 1 are twin primes.

Original entry on oeis.org

3, 30, 33, 63, 75, 78, 93, 102, 123, 138, 153, 162, 165, 192, 195, 240, 252, 273, 297, 303, 342, 387, 393, 420, 435, 438, 450, 468, 483, 522, 525, 540, 588, 630, 633, 660, 663, 717, 738, 747, 750, 765, 798, 825, 837, 855, 957, 978, 993, 1023, 1032, 1062
Offset: 1

Views

Author

Artur Jasinski, Nov 04 2006

Keywords

Examples

			3 is in the sequence since 14*3 - 1 = 41 and 14*3 + 1 = 43 are twin primes.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[1100], And @@ PrimeQ[{-1, 1} + 14# ] &] (* Ray Chandler, Nov 16 2006 *)

Extensions

Extended by Ray Chandler, Nov 16 2006

A124521 Numbers k such that 16*k - 1 and 16*k + 1 are twin primes.

Original entry on oeis.org

12, 15, 27, 72, 93, 117, 132, 162, 168, 195, 198, 210, 258, 267, 300, 327, 330, 345, 435, 468, 642, 765, 813, 855, 903, 912, 960, 978, 993, 1128, 1143, 1182, 1290, 1350, 1353, 1365, 1392, 1398, 1440, 1632, 1680, 1713, 1737, 1797, 1848, 1860, 1947, 1953, 1962
Offset: 1

Views

Author

Artur Jasinski, Nov 04 2006

Keywords

Examples

			12 is in the sequence since 16*12 - 1 = 191 and 16*12 + 1 = 193 are twin primes.
		

Crossrefs

Programs

  • Maple
    A124521:=n->`if`(isprime(16*n-1) and isprime(16*n+1), n, NULL): seq(A124521(n), n=1..2000); # Wesley Ivan Hurt, Oct 10 2014
  • Mathematica
    Select[Range[2000], And @@ PrimeQ[{-1, 1} + 16# ] &] (* Ray Chandler, Nov 16 2006 *)

Extensions

Extended by Ray Chandler, Nov 16 2006

A064217 Least k such that k*7^n +/- 1 are twin primes.

Original entry on oeis.org

4, 6, 18, 24, 138, 60, 150, 720, 150, 234, 138, 966, 138, 420, 60, 1584, 420, 60, 1830, 1134, 162, 1080, 1482, 684, 240, 10074, 3378, 3300, 2742, 984, 2400, 4050, 5262, 3510, 3378, 960, 3612, 516, 6840, 6474, 4680, 4950, 12612, 7986, 4290, 8046, 5208
Offset: 0

Views

Author

Robert G. Wilson v, Sep 21 2001

Keywords

Crossrefs

Programs

  • Mathematica
    Do[ k = 1; While[ ! PrimeQ[ k*7^n + 1 ] || ! PrimeQ[ k*7^n - 1 ], k++ ]; Print[ k ], {n, 0, 50} ]

Extensions

Offset corrected by Georg Fischer, May 01 2022

A064218 Least k such that k*10^n +/- 1 are twin primes.

Original entry on oeis.org

4, 3, 6, 3, 18, 240, 24, 3, 174, 93, 57, 141, 465, 501, 105, 822, 552, 324, 555, 237, 867, 1488, 543, 2556, 1050, 105, 51, 429, 1470, 147, 567, 1329, 636, 5016, 645, 4713, 1116, 1029, 462, 567, 5757, 951, 5547, 1245, 2823, 5931, 1989, 525, 6246, 1716
Offset: 0

Views

Author

Robert G. Wilson v, Sep 21 2001

Keywords

Crossrefs

Programs

  • Mathematica
    Do[ k = 1; While[ ! PrimeQ[ k*10^n + 1 ] || ! PrimeQ[ k*10^n - 1 ], k++ ]; Print[ k ], {n, 0, 50} ]

Extensions

Offset corrected by Georg Fischer, May 01 2022

A064220 Least k such that k*11^n +/- 1 are twin primes.

Original entry on oeis.org

4, 18, 12, 12, 120, 168, 72, 78, 810, 312, 90, 138, 270, 948, 408, 192, 960, 1920, 738, 4698, 810, 1872, 6978, 2058, 3222, 570, 870, 390, 9708, 14118, 9378, 6822, 8730, 2250, 1008, 8052, 732, 5400, 2910, 5982, 2688, 16758, 1908, 258, 762, 1488, 12678
Offset: 0

Views

Author

Robert G. Wilson v, Sep 21 2001

Keywords

Crossrefs

Programs

  • Mathematica
    Do[ k = 1; While[ ! PrimeQ[ k*11^n + 1 ] || ! PrimeQ[ k*11^n - 1 ], k++ ]; Print[ k ], {n, 0, 50} ]
    lk[n_]:=Module[{c=11^n,k=1},While[!PrimeQ[k*c+1]||!PrimeQ[k*c-1],k++];k]; Array[lk,50,0] (* Harvey P. Dale, Jun 15 2019 *)

Extensions

Offset corrected by Georg Fischer, May 01 2022

A064221 Least k such that k*12^n +/- 1 are twin primes.

Original entry on oeis.org

4, 1, 3, 19, 33, 4, 165, 35, 150, 35, 205, 35, 63, 435, 48, 4, 223, 399, 388, 149, 125, 86, 335, 491, 565, 876, 73, 250, 85, 526, 217, 139, 557, 676, 488, 629, 592, 1290, 2110, 366, 140, 2461, 6198, 6476, 2033, 751, 7258, 2054, 2275, 1345, 445
Offset: 0

Views

Author

Robert G. Wilson v, Sep 21 2001

Keywords

Crossrefs

Programs

  • Mathematica
    Do[ k = 1; While[ ! PrimeQ[ k*12^n + 1 ] || ! PrimeQ[ k*12^n - 1 ], k++ ]; Print[ k ], {n, 0, 50} ]
    lktpQ[n_]:=Module[{c=12^n,k=1},While[!AllTrue[k*c+{1,-1},PrimeQ],k++];k]; Array[lktpQ,60,0] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jul 21 2015 *)

Extensions

Offset corrected by Georg Fischer, May 01 2022

A071406 a(n) is the smallest multiplier of n! such that -1+a(n)*n! and 1+a(n)*n! are both primes.

Original entry on oeis.org

4, 2, 1, 3, 2, 17, 7, 6, 3, 14, 29, 30, 48, 27, 9, 24, 12, 97, 78, 47, 71, 80, 55, 13, 57, 20, 81, 259, 108, 163, 81, 118, 63, 215, 173, 513, 420, 561, 537, 1162, 158, 33, 122, 286, 459, 391, 305, 288, 114, 307, 15, 680, 355, 365, 338, 70, 23
Offset: 1

Views

Author

Labos Elemer, May 24 2002

Keywords

Examples

			n=7: a(7)=7, 7!=5040, 7.7!=35280 and {35279,35281} are primes.
		

Crossrefs

Programs

  • Mathematica
    Table[fl=1; Do[s=(j!)*k; If[PrimeQ[s-1]&&PrimeQ[s+1]&&Equal[fl, 1], Print[{j, k}]; fl=0], {k, 1, 2*j^2}], {j, 0, 100}]
    smnf[n_]:=Module[{k=1,f=n!},While[!PrimeQ[k*f+1]||!PrimeQ[k*f-1],k++]; k]; Array[smnf,60] (* Harvey P. Dale, May 24 2016 *)

A076806 Minimal odd k such that k*2^n-1 and k*2^n+1 are twin primes.

Original entry on oeis.org

3, 1, 9, 15, 81, 3, 9, 57, 45, 15, 99, 165, 369, 45, 345, 117, 381, 3, 69, 447, 81, 33, 1179, 243, 765, 375, 81, 387, 45, 345, 681, 585, 375, 267, 741, 213, 429, 3093, 165, 267, 255, 1095, 9, 147, 849, 405, 1491, 177, 1941, 927, 1125, 1197, 2001, 333, 519
Offset: 1

Views

Author

Andrey V. Kulsha, Nov 18 2002

Keywords

Examples

			a(4)=15 because k*2^4-1 and k*2^4+1 are twin primes for k=15 and are not twin primes for smaller odd k.
		

Crossrefs

Cf. A063983.

Programs

  • Magma
    a:=[]; for n in [1..55] do k:=1; while not (IsPrime(k*2^n-1) and IsPrime(k*2^n+1)) do k:=k+2; end while; Append(~a,k); end for; a; // Marius A. Burtea, Nov 16 2019
  • Mathematica
    f[n_] := Block[{k = 1}, While[ !PrimeQ[k*2^n - 1] || !PrimeQ[k*2^n + 1], k += 2]; k]; Array[f, 50]
    mok[n_]:=Module[{n2=2^n,k=1},While[!AllTrue[k*n2+{1,-1},PrimeQ],k=k+2];k]; Array[mok,60] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, May 19 2015 *)
  • PARI
    for(n=1, 100, N=2^n; forstep(k=1, 10^100, 2, if(isprime(k*N-1) && isprime(k*N+1), print1(k, ", "); break)))
    
  • Sage
    A076806 = lambda n: next(k for k in IntegerRange(1, infinity, 2) if is_prime(k*2**n-1) and is_prime(k*2**n+1)) # D. S. McNeil, Dec 08 2010
    
Previous Showing 11-19 of 19 results.