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

A199307 Primes of the form 4n^3 + 1.

Original entry on oeis.org

5, 109, 257, 1373, 2917, 4001, 27437, 62501, 157217, 202613, 237277, 296353, 470597, 629857, 665501, 1492993, 1556069, 1898209, 2456501, 2634013, 3217429, 3322337, 4244833, 5038849, 5180117, 6572129, 10512289, 11453153, 12706093
Offset: 1

Views

Author

N. J. A. Sloane, Nov 05 2011

Keywords

Comments

Dirichlet's theorem on primes in arithmetic progressions tells us, for example, that there are infinitely many primes of the form 4n+1. For primes represented by polynomials of degree greater than 1, the Bateman-Horn paper gives a conjecture on the density.

Crossrefs

Programs

A278981 a(n) is the first composite number having the same base-n digits as its prime factors (with multiplicity), excluding zero digits (or 0 if no such composite number exists).

Original entry on oeis.org

15, 399, 85, 318, 57, 906, 85, 1670, 1111, 18193, 185, 7205205, 4119, 63791, 4369, 1548502, 489, 258099, 451, 408166, 13315, 1012985, 679, 25841526, 26533, 2884373, 985, 49101338, 1057, 5362755, 1285, 2447558, 179503, 3091422, 1387, 5830693854, 82311, 149338, 2005
Offset: 2

Views

Author

Ely Golden, Dec 02 2016

Keywords

Comments

For an alternate program that only checks a single base at a time, use the code from "#the actual function (alternate)" instead of "#the actual function".
The computation of a(n) is exceedingly inefficient, requiring the checking of all natural values less than a(n). A more efficient way to compute a(n) is very desirable. - Ely Golden, Dec 25 2016
There is a lower bound on a(n), if not 0, of n^2 + n + 1. As well, a(n) must have 3 or more nonzero digits in base n (if n is odd, this lower bound is n^3 + n^2 + n + 1, and a(n) must have 4 or more nonzero digits in base n). This does not significantly improve the computation of a(n), however. - Ely Golden, Dec 30 2016
The pattern in the magnitude of a(n) is unclear. For some values of n, a(n) is much larger than for other values. For example, a(65) is 2460678262, whereas a(64) is only 4369 and a(66) is 4577. It seems as though even values of n typically have smaller values of a(n). - Ely Golden, Dec 30 2016
It is known that a(n) > 0 for any nonzero member of this sequence, as well as any n >= 2 of the form A280270(m), A070689(m), A279480(m), 2*A089001(m), 2*A115104(m), and 2*A280273(m)-1. It is likely, but not known, that a(n) > 0 for all n >= 2. - Ely Golden, Dec 30 2016

Examples

			a(2) = 15, as 15 is the first composite number whose base-2 nonzero digits (1111) are the same as the base-2 nonzero digits of its prime factors (11_2 and 101_2).
		

Crossrefs

a(10) = A176670(1); a(2) = A278909(1).

Programs

  • Mathematica
    g[n_] := g[n] = Flatten[ Table[#[[1]], {#[[2]]}] & /@ FactorInteger[n]];
    f[b_] := Block[{c = b^2}, While[ PrimeQ@ c || DeleteCases[ Sort[ IntegerDigits[c, b]], 0] != DeleteCases[ Sort[ Flatten[ IntegerDigits[g[c], b]]], 0], c++]; c]; Array[f, 39, 2] (* Robert G. Wilson v, Dec 30 2016 *)
  • SageMath
    def nonZeroDigits(x,n):
        if(x<=0|n<2):
            return []
        li=[]
        while(x>0):
            d=divmod(x,n)
            if(d[1]!=0):
                li.append(d[1])
            x=d[0]
        li.sort()
        return li;
    def nonZeroFactorDigits(x,n):
        if(x<=0|n<2):
            return []
        li=[]
        f=list(factor(x))
        #ensures inequality of nonZeroFactorDigits(x,n) and nonZeroDigits(x,n) if x is prime
        if((len(f)==1)&(f[0][1]==1)):
            return [];
        for c in range(len(f)):
            for d in range(f[c][1]):
                ld=nonZeroDigits(f[c][0],n)
                li+=ld
        li.sort()
        return li;
    #the actual function
    def a(n):
        c=2
        while(nonZeroFactorDigits(c,n)!=nonZeroDigits(c,n)):
            c+=1;
        return c;
    index=2
    while(index<=100):
        print(str(index)+" "+str(a(index)))
        index+=1
    print("complete")
    #the actual function (alternate)
    def a(n):
        c=2
        while(nonZeroFactorDigits(c,n)!=nonZeroDigits(c,n)):
            c+=1;
            if(c%1000000==1):
                print("checked up to "+str(c-1))
        return c;
    x=3 # 
    print(str(x)+" "+str(a(x)))
    print("complete")

A115349 Numbers k such that (4*k^5 + 1) is prime.

Original entry on oeis.org

1, 12, 15, 19, 27, 40, 49, 57, 60, 90, 93, 102, 132, 133, 147, 148, 153, 177, 190, 219, 240, 249, 258, 265, 274, 277, 280, 294, 313, 324, 337, 342, 363, 382, 394, 435, 448, 453, 462, 483, 489, 502, 522, 534, 538, 550, 580, 588, 609, 613, 634, 643, 648, 649
Offset: 1

Views

Author

Parthasarathy Nambi, Mar 07 2006

Keywords

Examples

			If k=90 then (4*90^5 + 1) = 23619600001, which is prime.
If k=133 then (4*133^5 + 1) = 166463183573, which is prime.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..1500] | IsPrime(4*n^5 + 1)]; // Vincenzo Librandi, Jan 31 2011
    
  • Maple
    select(t -> isprime(4*t^5+1), [$1..1000]); # Robert Israel, Jun 19 2018
  • Mathematica
    Do[If[PrimeQ[4*n^5 + 1], Print[n]], {n, 0, 1000}]
    Select[Range[700],PrimeQ[4#^5+1]&] (* Harvey P. Dale, Aug 25 2023 *)
  • PARI
    is(n)=isprime((4*n^5+1)) \\ Charles R Greathouse IV, Jun 13 2017

Extensions

More terms from Craig Baribault (csb166(AT)psu.edu), Mar 14 2006 and Jessica M. Cornwall (jmc510(AT)psu.edu), Mar 22 2006

A207838 Numbers k such that 5*k^4 + 1 is prime.

Original entry on oeis.org

6, 12, 114, 120, 324, 336, 390, 420, 498, 504, 540, 672, 756, 768, 840, 852, 876, 1014, 1062, 1092, 1122, 1170, 1188, 1248, 1266, 1314, 1344, 1398, 1440, 1470, 1524, 1758, 1770, 1818, 1860, 1968, 2028, 2046, 2088, 2184, 2190, 2232, 2262, 2268, 2304, 2382, 2430
Offset: 1

Views

Author

Bruno Berselli, Feb 21 2012

Keywords

Comments

All terms are multiples of 6.

Crossrefs

Cf. A207837 (primes of the form 5*k^4+1).

Programs

  • Magma
    [6*n: n in [1..406] | IsPrime(6480*n^4+1)];
  • Mathematica
    Select[Range[2440], PrimeQ[5 #^4 + 1] &] (* by definition *)
  • PARI
    for(n=1, 406, r=6480*n^4+1; if(isprime(r), print1(6*n", ")));
    

Formula

a(n) = ((A207837(n) - 1)/5)^1/4. - Paul F. Marrero Romero, Dec 07 2023

A115449 Numbers n such that 4*n^5 - 1 is prime.

Original entry on oeis.org

1, 2, 3, 8, 12, 23, 27, 42, 68, 75, 86, 96, 113, 117, 125, 135, 140, 146, 168, 182, 185, 188, 191, 198, 233, 245, 255, 267, 281, 287, 297, 306, 311, 318, 327, 360, 362, 366, 377, 390, 392, 395, 408, 416, 423, 432, 447, 456, 465, 486, 488, 497, 516, 531, 555
Offset: 1

Views

Author

Parthasarathy Nambi, Mar 08 2006

Keywords

Examples

			If n=96 then (4*n^5 - 1) = 32614907903 (prime).
		

Crossrefs

Programs

  • Mathematica
    Select[Range[500], PrimeQ[4*#^5 - 1] &] (* Stefan Steinerberger, Mar 09 2006 *)
  • PARI
    for(i=1,2000,if(isprime(4*i^5-1),print1(i,","))) \\ Matthew Conroy, Mar 12 2006
    
  • PARI
    for(i=1,2000,if(isprime(4*i^5-1),print1(i,","))) \\ Matthew Conroy, Mar 12 2006

Extensions

More terms from Stefan Steinerberger, Zak Seidov and Matthew Conroy, Mar 12 2006
More terms from Matthew Conroy, Mar 12 2006

A116947 Numbers k such that 4*k^6 + 1 is prime.

Original entry on oeis.org

1, 2, 3, 5, 7, 17, 20, 22, 28, 30, 40, 45, 67, 68, 70, 75, 82, 85, 87, 88, 95, 108, 123, 125, 140, 150, 153, 163, 172, 190, 197, 200, 210, 217, 220, 223, 232, 237, 248, 268, 270, 282, 283, 287, 303, 310, 320, 333, 340, 358, 367, 403, 405, 407, 423, 438, 445, 447
Offset: 1

Views

Author

Parthasarathy Nambi, Apr 03 2006

Keywords

Examples

			If k=197 then (4*k^6 + 1) is a prime with 15 digits.
		

Crossrefs

Programs

Extensions

More terms from Stefan Steinerberger, Apr 06 2006

A274794 Numbers n such that n^3 is the sum of two triangular numbers in exactly one way.

Original entry on oeis.org

0, 1, 3, 4, 7, 9, 10, 19, 24, 25, 34, 37, 39, 42, 49, 54, 55, 72, 73, 78, 85, 87, 93, 94, 102, 108, 109, 118, 138, 142, 147, 157, 160, 165, 168, 175, 192, 195, 202, 210, 214, 220, 228, 232, 243, 247, 249, 250, 252, 253, 258, 267, 273, 274, 279, 289, 297, 312, 333
Offset: 1

Views

Author

Altug Alkan, Jul 07 2016

Keywords

Comments

A115104 is a subsequence. Terms such that 4*n^3 + 1 is not prime are 24, 337, 457, 750, 840, 1015, ...

Examples

			3 is a term because 3^3 = 27 = 6 + 21.
		

Crossrefs

Programs

  • Mathematica
    Select[Range@ 333, Length[PowersRepresentations[4 #^3 + 1, 2, 2]] == 1 &] (* after Ant King at A052343, or *)
    nn = 20; t = (#^2 + #)/2 & /@ Range[0, nn^3]; Select[Range[0, nn], Function[n, Count[Transpose@ {#, n^3 - #} &@ Range[0, Floor[n^3/2]], k_ /; Times @@ Boole@ Map[MemberQ[t, #] &, k] == 1] == 1]] (* Michael De Vlieger, Jul 07 2016 *)
  • PARI
    a052343(n) = sum(i=0, (sqrtint(4*n + 1) - 1)\2, issquare(n - i - i^2));
    lista(nn) = for(n=0, nn, if(a052343(n^3) == 1, print1(n, ", ")));
Showing 1-7 of 7 results.