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

A090698 Primes of the form 2*n^2+1.

Original entry on oeis.org

3, 19, 73, 163, 883, 1153, 1459, 1801, 2179, 2593, 3529, 4051, 8713, 10369, 11251, 15139, 17299, 18433, 19603, 20809, 22051, 30259, 34849, 36451, 46819, 48673, 52489, 62659, 69193, 71443, 80803, 83233, 95923, 103969, 112339, 115201, 130051
Offset: 1

Views

Author

Kurmang. Aziz. Rashid, Dec 20 2003

Keywords

Comments

A prime p can be expressed as either the sum of two squares or the sum of two squares - 1, p = X^2 + Y^2 or p = X^2 + Y^2 - 1, if and only if p is of the form 2*(m^2)+1 where m is either 1 or a multiple of 3.
Conjecture: 2^(a(n)-1) - 3 is not prime. - Vincenzo Librandi, Feb 04 2013.
Primes in A058331. - Vincenzo Librandi, Apr 10 2015

Examples

			19 = 2^2 + 4^2 - 1 = 2*(3^2)+1
73 = 5^2 + 7^2 - 1 = 2*(6^2)+1
163= 8^2 + 10^2 -1 = 2*(9^2)+1
883= 10^2+ 28^2 -1 = 2*(21^2)+1
		

Crossrefs

Programs

Formula

a(n)=2*A089001(n)^2+1 = A000040(A090612(n)).

Extensions

Extended by Ray Chandler, Dec 21 2003

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")

A090612 Numbers k such that the k-th prime is of the form 2*j^2 + 1.

Original entry on oeis.org

2, 8, 21, 38, 153, 191, 232, 279, 327, 378, 493, 559, 1086, 1272, 1360, 1769, 1989, 2111, 2224, 2344, 2471, 3272, 3721, 3863, 4838, 5006, 5359, 6291, 6871, 7077, 7909, 8127, 9245, 9928, 10654, 10889, 12164, 12957, 13764, 14881, 16034, 16343, 16944
Offset: 1

Views

Author

Ray Chandler, Dec 21 2003

Keywords

Comments

A090698 indexed by A000040.

Examples

			From _Jon E. Schoenfield_, Jan 24 2018: (Start)
prime(8) = 19 = 2*3^2 + 1, so 8 is in the sequence.
prime(21) = 73 = 2*6^2 + 1, so 21 is in the sequence.
prime(33) = 137 = 2*68 + 1, and 68 is not a square, so 33 is not in the sequence. (End)
		

Crossrefs

Programs

  • Maple
    N:= 1000; # to get all entries corresponding to primes <= 2*N^2+1.
    R:= select(isprime,[seq(2*k^2+1,k=1..N)]):
    A090612:= map(numtheory[pi],R); # Robert Israel, May 09 2014
  • Mathematica
    Select[Range[18000],IntegerQ[Sqrt[(Prime[#]-1)/2]]&] (* Harvey P. Dale, Apr 25 2016 *)

Formula

a(n)=k such that A000040(k) = A090698(n) = 2*A089001(n)^2 + 1.

A116954 Numbers k such that 3*k^3 + 1 is prime.

Original entry on oeis.org

4, 10, 14, 16, 18, 20, 30, 36, 38, 48, 54, 58, 64, 70, 74, 86, 96, 106, 120, 140, 150, 154, 166, 170, 174, 176, 180, 200, 230, 234, 244, 260, 266, 268, 288, 296, 300, 304, 306, 308, 324, 330, 338, 340, 346, 348, 368, 384, 388, 394, 396, 406, 408, 434, 438, 440
Offset: 1

Views

Author

Parthasarathy Nambi, Apr 20 2006

Keywords

Comments

All terms are even. - Robert Israel, Jan 24 2018

Examples

			If k=48 then 3*k^3 + 1 = 331777 (prime).
		

Crossrefs

Cf. A089001.

Programs

Extensions

More terms from Stefan Steinerberger, Apr 22 2006, Jul 22 2006

A239874 Integers k such that 2*k^2 + 1 and 2*k^3 + 1 are prime.

Original entry on oeis.org

1, 6, 9, 21, 27, 30, 72, 96, 99, 162, 186, 204, 237, 264, 297, 321, 357, 360, 375, 492, 537, 621, 759, 819, 834, 897, 936, 1065, 1242, 1326, 1329, 1359, 1419, 1494, 1506, 1596, 1662, 1704, 1740, 1749, 1761, 1842, 1869, 2157, 2175, 2250, 2274, 2451, 2547
Offset: 1

Views

Author

Zak Seidov, Mar 28 2014

Keywords

Comments

All terms > 1 are multiples of 3. Also, no term is congruent to 3 modulo 5.

Crossrefs

Intersection of A089001 and A168550.

Programs

  • Maple
    select(t -> isprime(2*t^2+1) and isprime(2*t^3+1), [$1..6000]); # Robert Israel, Nov 03 2024
  • Mathematica
    s={1};Do[If[PrimeQ [2k^2+1]&&PrimeQ[2k^3+1],AppendTo[s,k]],{k,3,10^3,3}];s
    Select[Range[3500], PrimeQ[2 #^2 + 1] && PrimeQ[2 #^3 + 1]&] (* Vincenzo Librandi, Mar 29 2014 *)
  • PARI
    s=[]; for(n=1, 4000, if(isprime(2*n^2+1) && isprime(2*n^3+1), s=concat(s, n))); s \\ Colin Barker, Mar 28 2014

A089008 Numbers k such that 18*k^2 + 1 is prime.

Original entry on oeis.org

1, 2, 3, 7, 8, 9, 10, 11, 12, 14, 15, 22, 24, 25, 29, 31, 32, 33, 34, 35, 41, 44, 45, 51, 52, 54, 59, 62, 63, 67, 68, 73, 76, 79, 80, 85, 88, 91, 95, 99, 100, 102, 107, 108, 109, 117, 119, 120, 122, 125, 129, 131, 133, 135, 139, 141, 142, 143, 147, 150, 152, 154, 156
Offset: 1

Views

Author

N. J. A. Sloane, Dec 20 2003

Keywords

Comments

There are 8 consecutive terms at n=13537 and n=105819293 for n < 10^9. - Jean C. Lambry, Oct 19 2015
Since 18*k^2 + 1 is divisible by 17 for k == 4, 13 (mod 17), the maximum possible number of consecutive terms is 8, in which case the first term must be congruent to 5 modulo 17 and 7 or 8 modulo 11. - Jianing Song, Nov 14 2021

Crossrefs

Programs

  • Mathematica
    Select[Range[200],PrimeQ[18#^2+1]&]  (* Harvey P. Dale, Apr 25 2011 *)
  • PARI
    for(n=0, 1e3, if(isprime(k=(18*n^2 + 1)), print1(n", "))) \\ Altug Alkan, Oct 19 2015

Formula

a(n) = A089001(n+1)/3.

A239666 a(n) = least number k such that n*k^n+1 is prime, or 0 if no such number exists.

Original entry on oeis.org

1, 1, 4, 1, 8, 1, 4, 3, 10, 1, 42, 1, 60, 15, 22, 1, 8, 1, 198, 42, 10, 1, 8, 115, 34, 21, 0, 1, 54, 1, 130, 3, 4, 7, 72, 1, 778, 204, 30, 1, 108, 1, 178, 15, 14, 1, 924, 28, 234, 63, 1376, 1, 44, 3, 16, 27, 256, 1, 180, 1, 706, 51, 98, 0, 546, 1, 4, 153, 150, 1, 170
Offset: 1

Views

Author

Derek Orr, Mar 29 2014

Keywords

Comments

a(n) = 1 iff n+1 is prime.
If a(n) = 0, then n is in A097792. Note that the converse is not true: a(4) = 1, not 0.
If n is in A097792 and n > 4, then a(n) = 0. For a sketch of this proof, either n = 4b^4 for some positive integer b > 2 or n = (bp)^p for some prime p > 2 and some positive integer b. In the first case, n*k^n+1 can be factored by Sophie Germain's identity into two trinomials where neither can equal 1 since b > 2, so n*k^n+1 must be composite. In the second case, (bpk^{b^p p^(p-1)}+1) is a factor of n*k^n+1 since p is odd. - William Dean, Oct 23 2024

Examples

			3*1^3+1 = 4 is not prime. 3*2^3+1 = 25 is not prime. 3*3^3+1 = 82 is not prime. 3*4^3+1 = 193 is prime. Thus, a(3) = 4.
		

Crossrefs

Programs

  • PARI
    is_A097792(n)={my(p,t); n%4==0 && ispower(n\4, 4) || ((2 < p = ispower(n, , &t)) && if(isprime(p), t%p==0, foreach(factor(p)[, 1], q, q%2 && n%q==0 && return(1))))}
    a(n) = if(n!=4 && is_A097792(n), 0, for(k=1,oo,if(ispseudoprime(n*k^n+1),return(k)))); \\ [corrected by Andrew Howroyd, Oct 25 2024]

A239925 Integers n such that 2n^2+1, 2n^3+1, 2n^4+1 and 2n^5+1 are prime.

Original entry on oeis.org

1, 30, 8025, 44250, 49335, 49599, 155061, 218196, 255975, 293754, 324684, 333405, 336045, 367839, 381804, 416796, 476814, 514005, 529650, 558291, 668856, 682716, 747810, 893190, 930336, 933576, 1004004, 1246266, 1270860, 1383126, 1392111, 1427211, 1491645, 1497024, 1745904, 1786551
Offset: 1

Views

Author

Zak Seidov, Mar 29 2014

Keywords

Crossrefs

Subsequence of A239920. Cf. A089001, A168550, A239874.

Programs

  • Mathematica
    Select[Range[0, 2000000], PrimeQ[2 #^2 + 1] && PrimeQ[2 #^3 + 1] && PrimeQ[2 #^4 + 1] && PrimeQ[2 #^5 + 1] &] (* Vincenzo Librandi, Mar 29 2014 *)
    Select[Range[179*10^4], AllTrue[2 #^Range[2, 5] + 1, PrimeQ] &] (* Harvey P. Dale, Sep 24 2021 *)
  • PARI
    s=[]; for(n=1, 2000000, if(isprime(2*n^2+1) && isprime(2*n^3+1) && isprime(2*n^4+1) && isprime(2*n^5+1), s=concat(s, n))); s \\ Colin Barker, Mar 29 2014

A240234 Least number k such that k*n^k + 1 is prime, or 0 if no such number exists.

Original entry on oeis.org

1, 1, 2, 1, 1242, 1, 34, 5, 2, 1, 10, 1
Offset: 1

Views

Author

Derek Orr, Apr 02 2014

Keywords

Comments

a(n) = 1 if and only if n + 1 is prime.
Next term a(13), if it exists, is greater than 1000000. Other unknown terms are at index: 25, 29, 41, 47, 49, 53, 55, 69, 73, 79. (See links). - Jeppe Stig Nielsen, Aug 08 2014

Examples

			1*3^1 + 1 = 4 is not prime. 2*3^2 + 1 = 19 is prime. Thus, a(3) = 2.
		

Crossrefs

Programs

  • PARI
    a(n) = for(k=1,4000,if(ispseudoprime(k*n^k+1),return(k)))
    n=1;while(n<100,print1(a(n),", ");n++)

A188549 Numbers k such that 8*k^2+1 is a prime.

Original entry on oeis.org

3, 12, 15, 18, 21, 33, 36, 48, 51, 66, 78, 81, 93, 102, 114, 120, 132, 150, 153, 162, 180, 183, 213, 225, 228, 231, 234, 237, 243, 246, 252, 279, 282, 285, 294, 303, 318, 324, 333, 375, 378, 381, 384, 393, 396, 399, 417, 432, 450, 459, 468, 480, 489, 495, 510
Offset: 1

Views

Author

Vincenzo Librandi, Apr 04 2011

Keywords

Comments

Half of the even terms of A089001. - R. J. Mathar, Apr 09 2011

Crossrefs

Cf. A090685 (Primes of the form 8*n^2 + 1), A089001.

Programs

  • Magma
    [n: n in [1..1800]|IsPrime(8*n^2 + 1)]; // Vincenzo Librandi, Apr 04 2011
  • Mathematica
    Select[Range[600],PrimeQ[8#^2+1]&] (* Harvey P. Dale, Apr 11 2012 *)
Showing 1-10 of 17 results. Next