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

A090872 a(n) is the smallest number m greater than 1 such that m^(2^k)+1 for k=0,1,...,n are primes.

Original entry on oeis.org

2, 2, 2, 2, 2, 7072833120, 2072005925466, 240164550712338756
Offset: 0

Views

Author

Farideh Firoozbakht, Jan 31 2004

Keywords

Comments

The first five terms of this sequence correspond to Fermat primes.
Note that 7072833120 is not the smallest base to give at least six possibly nonconsecutive k values. For example, 292582836^(2^k) + 1 is prime for k = 0,1,2,3,4,7. - Jeppe Stig Nielsen, Sep 18 2022

Examples

			a(5)=7072833120 because 7072833120^2^k+1 for k=0,1,2,3,4,5 are primes.
		

Crossrefs

All solutions for fixed n: A006093 (n=0), A070689 (n=1), A070325 (n=2), A070655 (n=3), A070694 (n=4), A235390 (n=5), A335805 (n=6), A337364 (n=7).

Extensions

a(6) from Jens Kruse Andersen, May 06 2007
a(7) from Kellen Shenton, Aug 13 2020

A070155 Numbers k such that k-1, k+1 and k^2+1 are prime numbers.

Original entry on oeis.org

4, 6, 150, 180, 240, 270, 420, 570, 1290, 1320, 2310, 2550, 2730, 3360, 3390, 4260, 4650, 5850, 5880, 6360, 6780, 9000, 9240, 9630, 10530, 10890, 11970, 13680, 13830, 14010, 14550, 16230, 16650, 18060, 18120, 18540, 19140, 19380, 21600, 21840
Offset: 1

Views

Author

Labos Elemer, Apr 23 2002

Keywords

Comments

Essentially the same as A129293. - R. J. Mathar, Jun 14 2008
Solutions to the equation: A000005(n^4-1) = 8. - Enrique Pérez Herrero, May 03 2012
Terms > 6 are multiples of 30. Subsequence of A070689. - Zak Seidov, Nov 12 2012
{a(n)-1} is a subsequence of A157468; for n>1, {a(n)^2+2} is a subsequence of A242720. - Vladimir Shevelev, Aug 31 2014

Examples

			150 is a term since 149, 151 and 22501 are all primes.
		

Crossrefs

Programs

  • Maple
    select(n -> isprime(n-1) and isprime(n+1) and isprime(n^2+1), [seq(2*i,i=1..10000)]); # Robert Israel, Sep 02 2014
  • Mathematica
    Do[s=n; If[PrimeQ[s-1]&&PrimeQ[s+1]&&PrimeQ[1+s^2], Print[n]], {n, 1, 1000000}]
    Select[Range[22000],AllTrue[{#+1,#-1,#^2+1},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Dec 19 2014 *)
  • PARI
    is(k) = isprime(k-1) && isprime(k+1) && isprime(k^2+1); \\ Amiram Eldar, Apr 15 2024

Formula

For n>1, a(n)^2 = A242720(pi(a(n)-2)) - 2, where pi(n) is the prime counting function (A000720). - Vladimir Shevelev, Sep 02 2014

A070325 Numbers n such that n+1, n^2+1 and n^4+1 are primes.

Original entry on oeis.org

1, 2, 4, 6, 16, 180, 210, 430, 466, 556, 690, 760, 936, 966, 1150, 1870, 2266, 2646, 2676, 3390, 3516, 3910, 4006, 4566, 4590, 4936, 5086, 6576, 6970, 8626, 9276, 9336, 10006, 13686, 15510, 17320, 17550, 17850, 18040, 18060, 18586, 18700, 19380
Offset: 1

Views

Author

Benoit Cloitre, May 11 2002

Keywords

Crossrefs

Subsequence of A070689. [Zak Seidov, Apr 09 2011]

Programs

  • Mathematica
    Do[ If[ PrimeQ[n + 1] && PrimeQ[n^2 + 1] && PrimeQ[n^4 + 1], Print[n]], {n, 1, 20000}]
    Select[Prime[Range[2200]]-1,And@@PrimeQ[{#^2+1,#^4+1}]&] (* Harvey P. Dale, Sep 24 2011 *)
  • PARI
    for(n=1,33000,if(isprime(n^2+1)*isprime(n^4+1)*isprime(n+1)==1,print1(n,",")))

A237627 Semiprimes of the form n^3 + n^2 + n + 1.

Original entry on oeis.org

4, 15, 85, 259, 1111, 4369, 47989, 65641, 291919, 2016379, 2214031, 3397651, 3820909, 5864581, 9305311, 13881841, 15687751, 16843009, 19756171, 22030681, 28746559, 62256349, 64160401, 74264821, 79692331, 101412319, 117889591, 172189309, 185518471, 191435329
Offset: 1

Views

Author

K. D. Bajpai, Apr 22 2014

Keywords

Comments

All the terms in the sequence, except a(1), are odd.
Since n^3 + n^2 + n + 1 = (n^2 + 1)(n + 1), it is a necessary condition for n^2 + 1 to be a prime, and n + 1 as well. - Alonso del Arte, Apr 22 2014

Examples

			85 is in the sequence since 4^3 + 4^2 + 4 + 1 = 85 = 5 * 17, which is a semiprime.
259 is in the sequence since 6^3 + 6^2 + 6 + 1 = 259 = 7 * 37 which is a semiprime.
585 is not in the sequence, because, although it is 8^3 + 8^2 + 8 + 1, it has more than two prime factors.
		

Crossrefs

Programs

  • Magma
    IsSemiprime:=func; [s: n in [1..1000] | IsSemiprime(s) where s is n^3+n^2+n+1]; // Bruno Berselli, Apr 23 2014
    
  • Maple
    select(x-> numtheory[bigomega](x)=2, [n^3+n^2+n+1$n=1..1500])[];
  • Mathematica
    A237627 = {}; Do[t = n^3 + n^2 + n + 1; If[PrimeOmega[t] == 2, AppendTo[A237627, t]], {n, 1500}]; A237627 (* K. D. Bajpai *)
    (* For the b-file: *) n = 0; Do[t = k^3 + k^2 + k + 1; If[PrimeOmega[t] == 2, n++; Print[n, " ", t]], {k, 300000}] (* K. D. Bajpai *)
    Select[Table[n^3 + n^2 + n + 1, {n, 500}], PrimeOmega[#] == 2 &] (* Alonso del Arte, Apr 22 2014 *)
  • PARI
    is(n)=isprime(n^2+1) && isprime(n+1) \\ Charles R Greathouse IV, Aug 25 2014
    
  • Python
    from itertools import islice
    from sympy import isprime, nextprime
    def A237627_gen(): # generator of terms
        p = 1
        while (p:=nextprime(p)):
            if isprime((p-1)**2+1):
                yield p*((p-1)**2+1)
    A237627_list = list(islice(A237627_gen(),20)) # Chai Wah Wu, Feb 27 2023
  • Sage
    A237627 = list(n^3 + n^2 + n + 1 for n in (1..1000) if is_prime(n^2+1) and is_prime(n+1)); print(A237627) # Bruno Berselli, Apr 23 2014 - see comment by Alonso del Arte
    

Formula

Union of {4} and the members of A176070. - R. J. Mathar, Oct 04 2018

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

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

A235390 Numbers k such that k^(2^i)+1 are primes for i=0...5.

Original entry on oeis.org

1, 7072833120, 9736020616, 12852419340, 36632235070, 41452651506, 44619665520, 53569833730, 54673378956, 66032908020, 69449109580, 69936419290, 82549220670, 99574135650, 106362659256, 108208833756, 113366066976, 136032409906, 167385272500, 174963279540, 195763339776
Offset: 1

Author

Alex Ratushnyak, Jan 09 2014

Keywords

Comments

A subsequence of A070694.
Conjecture: the sequence is infinite.
For n=4 and n=9, a(n)*2+1 is also a prime.
The first term greater than 1 such that k^(2^6) + 1 is also prime, is a(148) = 2072005925466, see A335805. - Jeppe Stig Nielsen, Aug 18 2020

Examples

			k=7072833120 is in the sequence because the following are six primes: 7072833121, 7072833120^2+1, k^4+1, k^8+1, k^16+1, k^32+1.
		

Extensions

a(1)=1 inserted by Jeppe Stig Nielsen, Aug 11 2020

A067720 Numbers k such that phi(k^2+1) = k*phi(k+1).

Original entry on oeis.org

1, 2, 4, 6, 8, 10, 16, 36, 40, 66, 126, 130, 150, 156, 180, 210, 240, 250, 256, 270, 280, 306, 396, 400, 420, 430, 466, 490, 556, 570, 576, 646, 690, 700, 750, 760, 826, 906, 910, 936, 946, 966, 1060, 1096, 1150, 1276, 1290, 1306, 1320, 1366, 1566, 1570
Offset: 1

Author

Benoit Cloitre, Feb 05 2002

Keywords

Comments

a(n)+1 is prime except for a(5)=8.
Superset of A070689. Is a(5)=8 the only additional value? - Ralf Stephan, Feb 11 2004

Crossrefs

Programs

  • Mathematica
    Select[Range[2000], EulerPhi[#^2 + 1] == #*EulerPhi[# + 1] &] (* Amiram Eldar, Nov 21 2020 *)
  • PARI
    isok(k) = eulerphi(k^2+1) == k*eulerphi(k+1); \\ Michel Marcus, Nov 21 2020

A192794 Numbers k such that k + 2 and k^2 + 4 are primes.

Original entry on oeis.org

1, 3, 5, 15, 17, 27, 35, 45, 57, 65, 87, 95, 125, 135, 137, 147, 155, 177, 255, 267, 275, 347, 357, 407, 447, 455, 477, 507, 605, 615, 707, 717, 755, 767, 785, 795, 827, 837, 905, 935, 945, 1185, 1235, 1247, 1257, 1275, 1325, 1365, 1457, 1497, 1595, 1695
Offset: 1

Author

Zak Seidov, Dec 19 2012

Keywords

Comments

a(n) is odd for all n. For n > 2, the last digit of a(n) is either 5 or 7 because for n == 1, 3, 9 mod 10, either n+2 == 5 (mod 10) or n^2+4 == 5 (mod 10). Thus if m>1 is a term, then m+2 is in A045378. - Chai Wah Wu, Sep 06 2020

Examples

			1 + 2 = 3 and  1 + 4 = 5 are primes,
3 + 2 = 5 and  9 + 4 = 13 are primes,
5 + 2 = 7 and 25 + 4 = 29 are primes.
		

Crossrefs

Programs

  • Maple
    filter:= n -> isprime(n+2) and isprime(n^2+4):
    select(filter, [seq(i,i=1..2000,2)]); # Robert Israel, Nov 11 2023
  • PARI
    {a=2;forstep(n=1,2000,2,if(isprime(n+a)&&isprime(n^2+a^2), print1(n",")))}

A335805 Numbers b such that b^(2^i) + 1 is prime for i = 0...6.

Original entry on oeis.org

1, 2072005925466, 5082584069416, 12698082064890, 29990491969260, 46636691707050, 65081025897426, 83689703895606, 83953213480290, 105003537341346, 105699143244090, 107581715369910, 111370557491826, 111587899569066, 128282713771996, 133103004825210
Offset: 1

Author

Jeppe Stig Nielsen, Aug 14 2020

Keywords

Comments

Explicitly, for each b, the seven numbers b+1, b^2+1, b^4+1, b^8+1, b^16+1, b^32+1, and b^64+1 must be primes (generalized Fermat primes).
The first term greater than 1 such that b^(2^7) + 1 is also prime, is 240164550712338756, see A337364. - Jeppe Stig Nielsen, Aug 25 2020

A337364 Numbers b such that b^(2^i) + 1 is prime for i = 0...7.

Original entry on oeis.org

1, 240164550712338756, 3686834112771042790, 6470860179642426900, 7529068955648085700, 10300630358100537120, 16776829808789151280, 17622040391833711780, 19344979062504927000, 23949099004395080026, 25348938242408650240, 30262840543567048476, 35628481193915651646
Offset: 1

Author

Jeppe Stig Nielsen, Aug 25 2020

Keywords

Comments

Explicitly, for each b, the eight numbers b+1, b^2+1, b^4+1, b^8+1, b^16+1, b^32+1, b^64+1, and b^128+1 must be primes (generalized Fermat primes).

Extensions

a(10)-a(12) from Jeppe Stig Nielsen, Sep 04 2020
a(13) found by Rob Gahan added by Jeppe Stig Nielsen, Feb 15 2021
Showing 1-10 of 18 results. Next