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

A125019 Records in A063983 if the initial 4 is ignored (cf. A125848).

Original entry on oeis.org

2, 9, 12, 57, 99, 165, 486, 681, 810, 1854
Offset: 1

Views

Author

Artur Jasinski, Nov 16 2006

Keywords

Crossrefs

Extensions

Corrected and extended by R. J. Mathar, Nov 29 2006

A125848 Records in A063983.

Original entry on oeis.org

4, 9, 12, 57, 99, 165, 486, 681, 810, 1854
Offset: 1

Views

Author

Artur Jasinski, Nov 16 2006

Keywords

Crossrefs

Extensions

Corrected and extended by R. J. Mathar, Nov 29 2006
Edited by N. J. A. Sloane, Jul 03 2008

A045753 Numbers n such that 4n-1 and 4n+1 are both primes.

Original entry on oeis.org

1, 3, 15, 18, 27, 45, 48, 57, 60, 78, 87, 105, 108, 150, 165, 207, 255, 258, 273, 288, 330, 357, 363, 372, 402, 405, 417, 447, 468, 483, 507, 522, 528, 567, 585, 648, 672, 678, 750, 780, 792, 813, 825, 840, 843, 867, 882, 885, 918, 942, 963, 1005, 1023
Offset: 1

Views

Author

Keywords

Examples

			3 belongs to the sequence because 4*3+1 and 4*3-1 are both primes.
		

Crossrefs

Programs

  • Magma
    [n: n in [1..2000] | IsPrime(4*n+1) and IsPrime(4*n-1)] // Vincenzo Librandi, Nov 18 2010
    
  • Mathematica
    Select[Range[1023], And @@ PrimeQ[{-1, 1} + 4# ] &] (* Ray Chandler, Dec 06 2006 *)
  • PARI
    list(lim)=my(v=List(),p=2); forprime(q=3,4*lim+1, if(q-p==2 && p%4==3, listput(v,q\4)); p=q); Vec(v) \\ Charles R Greathouse IV, Dec 03 2016

Extensions

More terms from Erich Friedman

A124519 Numbers k such that 12*k - 1 and 12*k + 1 are twin primes.

Original entry on oeis.org

1, 5, 6, 9, 15, 16, 19, 20, 26, 29, 35, 36, 50, 55, 69, 85, 86, 91, 96, 110, 119, 121, 124, 134, 135, 139, 149, 156, 161, 169, 174, 176, 189, 195, 216, 224, 226, 250, 260, 264, 271, 275, 280, 281, 289, 294, 295, 306, 314, 321, 335, 341, 344, 355, 356, 379, 399
Offset: 1

Views

Author

Artur Jasinski, Nov 04 2006

Keywords

Examples

			1 is in the sequence since 12*1 - 1 = 11 and 12*1 + 1 = 13 are twin primes.
		

Crossrefs

Programs

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

Extensions

Extended by Ray Chandler, Nov 16 2006

A124522 a(n) = smallest k such that 2nk-1 and 2nk+1 are primes.

Original entry on oeis.org

2, 1, 1, 9, 3, 1, 3, 12, 1, 3, 9, 3, 12, 15, 1, 6, 3, 2, 6, 6, 1, 15, 3, 4, 3, 6, 2, 48, 6, 1, 21, 3, 3, 15, 6, 1, 27, 3, 4, 3, 15, 5, 12, 15, 2, 9, 3, 2, 9, 6, 1, 3, 60, 1, 6, 24, 2, 3, 9, 2, 129, 12, 7, 9, 15, 5, 12, 27, 1, 3, 9, 3, 42, 45, 1, 90, 3, 2, 66, 21, 5, 63, 27, 16, 6, 6, 2, 12, 24, 1, 6
Offset: 1

Views

Author

Artur Jasinski, Nov 04 2006

Keywords

Crossrefs

Programs

  • Maple
    isA001359 := proc(n) RETURN( isprime(n) and isprime(n+2)) ; end: A124522 := proc(n) local k; k :=1 ; while true do if isA001359(2*n*k-1) then RETURN(k) ; fi ; k := k+1 ; od ; end: for n from 1 to 60 do printf("%d,",A124522(n)) ; od ; # R. J. Mathar, Nov 06 2006
  • Mathematica
    f[n_] := Block[{k = 1},While[Nand @@ PrimeQ[{-1, 1} + 2n*k], k++ ];k];Table[f[n], {n, 91}] (* Ray Chandler, Nov 16 2006 *)
    skp[n_]:=Module[{k=1},While[AnyTrue[2n k+{1,-1},CompositeQ],k++];k]; Join[{2},Array[skp,100,2]] (* Harvey P. Dale, Mar 30 2024 *)
  • PARI
    {for(n=1,91,k=1;while(!isprime(2*n*k-1)||!isprime(2*n*k+1),k++);print1(k, ","))}

Extensions

Edited and extended by Klaus Brockhaus and R. J. Mathar, Nov 06 2006

A071576 a(n) = least k such that 2ik + 1 is prime for all 1 <= i <= n.

Original entry on oeis.org

1, 1, 1, 165, 5415, 12705, 256410, 256410, 6480303060, 217245863835, 946622690475, 35511547806735, 439116128090640, 5714676453270219435
Offset: 1

Views

Author

Benoit Cloitre, May 31 2002

Keywords

Crossrefs

Programs

  • Mathematica
    k = 1; Do[ While[p = Table[2*i*k + 1, {i, 1, n}]; Union[ PrimeQ[p]] != {True}, k++ ]; Print[k], {n, 1, 15}] (* Robert G. Wilson v *)
  • PARI
    for(n=1,6,s=1; while(sum(i=1,n,isprime(2*s*i+1))
    				

Extensions

Extended by Robert G. Wilson v, Jun 06 2002
a(9) from Ryan Propper, Jun 20 2005
a(10)-a(13) from Don Reble, Nov 05 2006
a(14) from Giovanni Resta, Apr 01 2017

A124518 Numbers k such that 10k-1 and 10k+1 are twin primes.

Original entry on oeis.org

3, 6, 15, 18, 24, 27, 42, 57, 60, 66, 81, 102, 105, 123, 129, 132, 162, 195, 213, 231, 234, 255, 273, 279, 297, 300, 312, 330, 333, 336, 339, 354, 393, 402, 405, 423, 426, 465, 480, 501, 510, 528, 552, 564, 585, 588, 609, 627, 630, 636, 645, 657, 666, 669, 678
Offset: 1

Views

Author

Artur Jasinski, Nov 04 2006

Keywords

Comments

All terms are divisible by 3. - Robert Israel, Apr 07 2019

Crossrefs

Programs

  • Maple
    select(t -> isprime(10*t+1) and isprime(10*t-1), [seq(i,i=3..1000,3)]); # Robert Israel, Apr 07 2019
  • Mathematica
    Select[Range[678], And @@ PrimeQ[{-1, 1} + 10# ] &] (* Ray Chandler, Nov 16 2006 *)

A124065 Numbers k such that 8*k - 1 and 8*k + 1 are twin primes.

Original entry on oeis.org

9, 24, 30, 39, 54, 75, 129, 144, 165, 186, 201, 234, 261, 264, 324, 336, 339, 375, 390, 396, 420, 441, 459, 471, 516, 534, 600, 621, 654, 660, 690, 705, 735, 795, 819, 849, 870, 891, 936, 945, 1011, 1029, 1125, 1155, 1179, 1215, 1221, 1251, 1284, 1395, 1419
Offset: 1

Views

Author

Artur Jasinski, Nov 04 2006

Keywords

Examples

			9 is in the sequence since 8*9 - 1 = 71 and 8*9 + 1 = 73 are twin primes.
		

Crossrefs

Programs

  • Magma
    [n: n in [1..2000] | IsPrime(8*n+1) and IsPrime(8*n-1)] // Vincenzo Librandi, Mar 08 2010
    
  • Mathematica
    Select[Range[1500], And @@ PrimeQ[{-1, 1} + 8# ] &] (* Ray Chandler, Nov 16 2006 *)
  • Python
    from sympy import isprime
    def ok(n): return isprime(8*n - 1) and isprime(8*n + 1)
    print(list(filter(ok, range(1420)))) # Michael S. Branicky, Sep 24 2021

Extensions

Extended by Ray Chandler, Nov 16 2006

A064215 Least k such that k*6^n +/- 1 are twin primes.

Original entry on oeis.org

1, 2, 2, 2, 18, 3, 33, 255, 212, 115, 147, 102, 17, 33, 308, 87, 198, 33, 172, 418, 210, 35, 158, 847, 1010, 292, 157, 1318, 263, 212, 642, 107, 458, 102, 17, 635, 735, 262, 2422, 3517, 1222, 605, 1362, 227, 367, 602, 207, 2023, 3925, 1857, 822, 137, 5568, 928
Offset: 1

Views

Author

Robert G. Wilson v, Sep 21 2001

Keywords

Comments

As n increases, a(n) is in average = 0.44*n^2. It appears that 62% of a(n)/n^2 are < 0.44. - Pierre CAMI, Jun 01 2012

Crossrefs

Cf. A063983.

Programs

  • Maple
    A064215 := proc(n)
        for k from 1 do
            if isprime(k*6^n-1) and isprime(k*6^n+1) then
                return k;
            end if;
        end do:
    end proc: # R. J. Mathar, Sep 17 2015
  • Mathematica
    Table[ k = 1; While[ ! PrimeQ[ k*6^n + 1 ] || ! PrimeQ[ k*6^n - 1 ], k++ ]; k, {n, 50} ]

A064213 Least k such that k*3^n +- 1 are twin primes.

Original entry on oeis.org

4, 2, 2, 4, 10, 40, 58, 64, 28, 24, 8, 210, 70, 36, 12, 4, 78, 26, 28, 20, 90, 30, 10, 630, 210, 70, 82, 416, 612, 204, 68, 930, 310, 406, 1078, 1164, 388, 176, 190, 334, 190, 726, 242, 1004, 398, 1430, 1372, 2730, 910, 1560, 520
Offset: 0

Views

Author

Robert G. Wilson v, Sep 21 2001

Keywords

Comments

k must be even because 3^n is odd. - Harry J. Smith, Sep 10 2009

Crossrefs

Cf. A063983.

Programs

  • Mathematica
    Do[ k = 1; While[ ! PrimeQ[ k*3^n + 1 ] || ! PrimeQ[ k*3^n - 1 ], k++ ]; Print[ k ], {n, 0, 50} ]
  • PARI
    { for (n=0, 225, k=0; p=3^n; until (isprime(k*p - 1) && isprime(k*p + 1), k+=2); write("b064213.txt", n, " ", k); ) } \\ Harry J. Smith, Sep 10 2009

Extensions

Offset changed from 1 to 0 by Harry J. Smith, Sep 10 2009
Showing 1-10 of 19 results. Next