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

A090686 Primes of the form 6n^2 - 1.

Original entry on oeis.org

5, 23, 53, 149, 293, 383, 599, 863, 1013, 1733, 2399, 2903, 4373, 4703, 5399, 6143, 7349, 8663, 11093, 12149, 16223, 18149, 20183, 21599, 23063, 23813, 25349, 27743, 29399, 31973, 33749, 35573, 40343, 41333, 45413, 51893, 56453, 59999, 62423
Offset: 1

Views

Author

Cino Hilliard, Dec 18 2003

Keywords

Comments

Subset of A007528. The values of n for which 6*n^2 - 1 is prime are 1, 2, 3, 5, 7, 8, 10, 12, 13, 17, 20, 22, 27, 28, 30, 32, 35, 38, 43, 45, 52, 55, 58, 60, 62, 63, 65, 68, 70, 73, 75, 77, 82, 83, 87, 93, 97, 100, ... - Jonathan Vos Post, Aug 27 2006

Crossrefs

Programs

  • Magma
    [a: n in [0..500] | IsPrime(a) where a is 6*n^2-1]; // Vincenzo Librandi, Dec 05 2011
  • Mathematica
    lst={};Do[p=6*n^2-1;If[PrimeQ[p],AppendTo[lst,p]],{n,0,3*5!}];lst (* Vladimir Joseph Stephan Orlovsky, Jan 27 2009 *)
    Select[Table[6n^2-1,{n,0,700}],PrimeQ] (* Vincenzo Librandi, Dec 05 2011 *)
  • PARI
    mx2pmp(n) = { for(x=1,n, y = 6*x^2-1; if(isprime(y),print1(y",")) ) }
    

Extensions

Edited by N. J. A. Sloane at the suggestion of R. J. Mathar, Apr 14 2008

A247965 a(n) is the smallest number k such that m*k^2+1 is prime for all m = 1 to n.

Original entry on oeis.org

1, 1, 6, 3240, 113730, 30473520, 3776600100, 16341921960, 3332396388090
Offset: 1

Views

Author

Michel Lagneau, Sep 28 2014

Keywords

Comments

Conjecture : the sequence is infinite.
a(10) > 15466500000000. a(11) > 107669100000000. - Hiroaki Yamanouchi, Oct 01 2014

Examples

			a(3)=6 because 6^2+1 = 37, 2*6^2+1 = 73 and 3*6^2+1 = 109 are prime numbers.
The resulting primes begin like this:
2;
2, 3;
37, 73, 109;
10497601, 20995201, 31492801, 41990401;
... - _Michel Marcus_, Sep 29 2014
		

Crossrefs

Programs

  • Maple
    for n from 1 to 6 do:
      ii:=0:
       for k from 1 to 10^10 while(ii=0) do:
         ind:=0:
           for m from 1 to n do:
             p:=m*k^2+1:
              if type(p,prime) then
               ind:=ind+1:
               fi:
            od:
           if ind=n then
            ii:=1:printf ( "%d %d \n",n,k):
           fi:
        od:
      od:
  • PARI
    a(n)=k=1;while(k,c=0;for(i=1,n,if(!ispseudoprime(i*k^2+1),c++;break));if(!c,return(k));if(c,k++))
    n=1;while(n<10,print1(a(n),", ");n++) \\ Derek Orr, Sep 28 2014

Extensions

a(7)-a(9) from Hiroaki Yamanouchi, Oct 01 2014

A346948 Isolated single primes enclosed by six composites on hexagonal spiral board of odd numbers.

Original entry on oeis.org

211, 257, 277, 331, 509, 563, 587, 647, 653, 673, 683, 709, 751, 757, 839, 853, 919, 983, 997, 1087, 1117, 1123, 1163, 1283, 1433, 1447, 1493, 1531, 1579, 1637, 1733, 1777, 1889, 1913, 1973, 1993, 2179, 2207, 2251, 2273, 2287, 2333, 2357, 2399, 2447, 2467
Offset: 1

Views

Author

Ya-Ping Lu, Aug 08 2021

Keywords

Comments

It seems that more isolated primes, m, appear in regions 6*k^2-16*k+13 <= m <= 6*k^2-14*k+7 and 6*k^2-10*k+7 <= m <= 6*k^2-8*k+1 than the other 4 regions, where k (>= 1) is the layer number on the hexagonal board, which is illustrated in A345654.
Numbers of prime terms appearing in the 6 regions and 6 arms of a 10000-layer hexagonal board, with the 299970001 odd numbers up to 599940001, are:
Region Appearance Arm Appearance
---------------------------------- ---------- ----------------- ----------
6*k^2-18*k+15 <= m <= 6*k^2-16*k+9 2681490 m = 6*k^2-16*k+11 692
6*k^2-16*k+13 <= m <= 6*k^2-14*k+7 3192576 m = 6*k^2-14*k+ 9 551
6*k^2-14*k+11 <= m <= 6*k^2-12*k+5 2681571 m = 6*k^2-12*k+ 7 671
6*k^2-12*k+ 9 <= m <= 6*k^2-10*k+3 2681254 m = 6*k^2-10*k+ 5 545
6*k^2-10*k+ 7 <= m <= 6*k^2- 8*k+1 3191045 m = 6*k^2- 8*k+ 3 721
6*k^2- 8*k+ 5 <= m <= 6*k^2- 6*k-1 2680620 m = 6*k^2- 6*k+ 1 1040

Examples

			3 is not a term because four of the six neighbors (1, 5, 13, 15, 17 and 19) are primes.
211 is a term because 211 is a prime and all six neighbors (145, 147, 209, 213, 287 and 289) are composites.
		

Crossrefs

Programs

  • Python
    from sympy import isprime; from math import sqrt, ceil
    def neib(m):
        if m == 1: return [3, 5, 7, 9, 11, 13]
        if m == 3: return [17, 19, 5, 1, 13, 15]
        L = [m for i in range(6)]; n = int(ceil((3+sqrt(6*m + 3))/6)); x=6*n*n; y=12*n
        a0 = x-18*n+15; a1 =x-16*n+11; a2 =x-14*n+9
        a3 = x-y+7; a4 =x-10*n+5; a5 =x-8*n+3; a6 =x-6*n+1
        p = 0 if m==a0 else 1 if m>a0 and ma1 and ma2 and ma3 and ma4 and ma5 and m
    				
Showing 1-3 of 3 results.