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

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

Original entry on oeis.org

0, 1, 2, 4, 5, 6, 9, 16, 17, 30, 54, 57, 60, 65, 132, 180, 320, 696, 782, 822, 897, 1252, 1454, 4217, 5480, 6225, 7842, 12096, 13782, 17720, 43956, 64822, 82780, 105106, 152529, 165896, 191814, 529680, 1074726, 1086112, 1175232, 1277862, 1346542, 3123036, 3648969, 5570081, 6236772, 10852677
Offset: 1

Views

Author

Keywords

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A056802 (k such that 2*9^k + 1 is prime).
Cf. A111974 (primes of the form 2*3^k + 1), A003307 (k such that 2*3^k - 1 is prime).

Programs

Extensions

More terms from T. D. Noe, Aug 24 2005
More terms from David Broadhurst, Feb 14 2010
Another term from David Broadhurst, Feb 22 2010
a(42)-a(45) found by Ryan Propper and Paul S. Vanderveen, Feb 09 2020
a(46) found by Ryan Propper, Feb 14 2020
a(47)-a(48) found by Ryan Propper added by Paul S. Vanderveen, Jan 08 2023

A234503 Number of ways to write n = k + m with k > 0 and m > 0 such that 3^(phi(k)/2 + phi(m)/12) + 2 is prime, where phi(.) is Euler's totient function.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 2, 1, 1, 2, 3, 2, 1, 1, 1, 2, 1, 2, 2, 3, 2, 4, 4, 4, 2, 3, 2, 1, 3, 4, 8, 3, 4, 4, 4, 6, 3, 4, 6, 3, 5, 5, 3, 2, 2, 6, 5, 3, 2, 3, 7, 4, 3, 4, 4, 3, 4, 4, 4, 5, 2, 5, 2, 6, 5, 7, 3, 5, 7, 6, 13, 5, 7, 7, 10, 6, 8, 8, 9, 6, 7, 8, 6, 6, 5, 7, 9, 6, 7, 8, 10
Offset: 1

Views

Author

Zhi-Wei Sun, Dec 26 2013

Keywords

Comments

It might seem that a(n) > 0 for all n > 14, but a(43905) = 0. If a(n) > 0 infinitely often, then there are infinitely many primes of the form 3^m + 2.
Similarly, it might seem that for n > 26 there is a positive integer k < n such that m = phi(k)/2 + phi(n-k)/12 is an integer with 3^m - 2 prime, but n = 41213 is a counterexample.
See also A234451 and A236358 for similar sequences.

Examples

			a(15) = 1 since 15 = 1 + 14 with 3^(phi(1)/2 + phi(14)/12) + 2 = 3 + 2 = 5 prime.
a(23) = 1 since 23 = 10 + 13 with 3^(phi(10)/2 + phi(13)/12) + 2 = 3^3 + 2 = 29 prime.
a(24) = 1 since 24 = 3 + 21 with 3^(phi(3)/2 + phi(21)/12) + 2 = 3^2 + 2 = 11 prime.
a(37) = 1 since 37 = 9 + 28 with 3^(phi(9)/2 + phi(28)/12) + 2 = 3^4 + 2 = 83 prime.
		

Crossrefs

Programs

  • Mathematica
    f[n_,k_]:=3^(EulerPhi[k]/2+EulerPhi[n-k]/12)+2
    a[n_]:=Sum[If[PrimeQ[f[n,k]],1,0],{k,1,n-1}]
    Table[a[n],{n,1,100}]

A236358 a(n) = |{0 < k < n: m = phi(k)/2 + phi(n-k)/12 is an integer with 2*3^m + 1 prime}|, where phi(.) is Euler's totient function.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 2, 1, 0, 2, 3, 1, 1, 0, 2, 1, 0, 2, 3, 3, 3, 2, 3, 2, 1, 4, 1, 4, 1, 4, 5, 3, 5, 7, 7, 8, 5, 5, 4, 4, 7, 7, 4, 7, 3, 6, 4, 5, 5, 6, 7, 6, 4, 5, 7, 6, 9, 5, 8, 7, 7, 4, 6, 5, 4, 6, 9, 8, 3, 6, 8, 9, 8, 8, 7, 8, 8, 9, 8, 4, 7, 4, 7, 7, 5, 4, 8, 6, 6, 7, 11
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 23 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 26.
(ii) For any integer n > 37, there is a positive integer k < n such that m = phi(k)/2 + phi(n-k)/12 is an integer with 2*3^m - 1 prime.
We have verified both parts for n up to 50000. Clearly, part (i) implies that there are infinitely many positive integers m with 2*3^m + 1 prime, while part (ii) implies that there are infinitely many positive integers m with 2*3^m - 1 prime.

Examples

			 a(36) = 1 since phi(15)/2 + phi(21)/12 = 4 + 1 = 5 with 2*3^5 + 1 = 487 prime.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=IntegerQ[n]&&PrimeQ[2*3^n+1]
    f[n_,k_]:=EulerPhi[k]/2+EulerPhi[n-k]/12
    a[n_]:=Sum[If[p[f[n,k]],1,0],{k,1,n-1}]
    Table[a[n],{n,1,100}]

A136474 Primes that divide 2^(3^n)+1 for some n.

Original entry on oeis.org

3, 19, 163, 1459, 17497, 52489, 87211, 135433, 139483, 1220347, 5419387, 6049243, 28934011, 86093443, 227862073, 272010961
Offset: 1

Views

Author

Christopher J. Smyth, Feb 16 2008

Keywords

Comments

This sequence is a subsequence of A057719.
272010961 is the last term less than 3*10^9. The n for each prime is 0, 2, 4, 5, 7, 8, 3, 4, 5, 9, 7, 7, 8, 16, 6, 4. Some terms from A111974 are in this sequence also: 411782264189299, 116299474006080119380780339, and 84782316550432407028588866403. If p=2*3^k+1 is prime for an even k, then p is in this sequence.

Examples

			1220347 belongs to the sequence as it is a factor of 2^(3^9)+1 (This is the largest member of the sequence less than 5000000)
		

Crossrefs

Programs

  • Maple
    with(numtheory):L:=3;for p from 5 to 5000000 do if isprime(p) then q:=op(2,ifactors(order(2,p)));if nops(q)=2 then if op(1,op(1,q))=2 and op(2,op(1,q))=1 and op(1,op(2,q))=3 then L:=L,p;fi;fi;fi;od;L;
  • Mathematica
    Reap[Do[p=Prime[n]; mo=MultiplicativeOrder[2, p]; If[EvenQ[mo] && IntegerQ[Log[3,mo/2]], Sow[p]], {n, PrimePi[10^7]}]][[2,1]]

A340765 Numbers k such that iterations of phi(k), phi(phi(k)), ... end in ... 6, 2, 1.

Original entry on oeis.org

6, 7, 9, 14, 18, 19, 27, 38, 54, 81, 162, 163, 243, 326, 486, 487, 729, 974, 1458, 1459, 2187, 2918, 4374, 6561, 13122, 19683, 39366, 39367, 59049, 78734, 118098, 177147, 354294, 531441, 1062882, 1594323, 3188646, 4782969, 9565938, 14348907, 28697814, 43046721, 86093442, 86093443, 129140163, 172186886
Offset: 1

Views

Author

Franz Vrabec, Jan 20 2021

Keywords

Comments

Infinite set (see reference).
Contains 3^k for k >= 2 and 2*3^k for k >= 1, and all members of A111974 except 3. - Robert Israel, Dec 23 2021

Examples

			19 is in the list because phi(phi(19)) = phi(18) = 6.
		

Crossrefs

Cf. A000010, A340762 (complement relative to {n>=4}).

Programs

  • Maple
    R:= {6}: Agenda:= {6}: count:= 1:
    while count - nops(Agenda) < 99 do
      v:= min(Agenda);
      W:= convert(numtheory:-invphi(v),set);
      count:= count + nops(W);
      Agenda:= Agenda minus {v} union W;
      R:= R union W;
    od:
    sort(select(`<=`, convert(R,list),min(Agenda))); # Robert Israel, Dec 23 2021
  • Mathematica
    Select[Range[4, 10000], FixedPointList[EulerPhi, #][[-4]] == 6 &] (* Amiram Eldar, Jan 27 2021 *)
  • PARI
    isok(k) = if (k>=6, while((k!=6) && (k!=4), k=eulerphi(k))); k == 6; \\ Michel Marcus, Feb 01 2021

A229222 Smallest prime p such that p contains a digit larger than 1 and the sum of the n-th powers of the decimal digits of p is a prime number.

Original entry on oeis.org

2, 23, 113, 23, 191, 223, 191, 41, 223, 113, 157, 191, 137, 113, 113, 43, 137, 191, 179, 337, 577, 223, 227, 113, 263, 113, 199, 229, 263, 199, 467, 89, 223, 179, 223, 113, 443, 683, 1279, 337, 661, 463, 827, 2281, 577, 223, 223, 661, 137, 229, 11399, 461, 577
Offset: 1

Views

Author

Michel Lagneau, Sep 16 2013

Keywords

Comments

We impose the condition that p is not in A020449 in order to avoid trivial sequences with infinite repetitions with the numbers 11 if p>1, or 101 if p>11, or 101111 if p > 101, ... for example if p > 1 the sequence is {2, 11, 11, 11, ...}, if p > 11 the sequence is {23, 23, 101, 23, 101, 101, 41, 101, 101, 101, 101, 101, ...}.
a(n) is an unification of a family of sequences mentioned hereafter:
A082101: primes of the form 2^n+3^n => 23 is in the sequence;
A057735: primes of the form 3^n+2 => 113 is in the sequence;
A153133: primes of the form 2^n+3^(n-1) => 223 is in the sequence;
A228034: primes of the form 9^n+2 => 191 is in the sequence;
A057733: primes of the form 2^n+3 => 2111 is in the sequence;
A228026: primes of the form 4^n+3 => 4111 is in the sequence;
A228034: primes of the form 9^n+2 => 191 is in the sequence;
A182330: primes of the form 5^n+2 => 151 is in the sequence;
A111974: primes of the form 2*3^n+1 => 313 is in the sequence;
A102903: primes of the form 3^n+4 => 11113 is in the sequence.
In this sequence, we observe repetitions of numbers such that 23, 113, 223, 191, 199, 223,... and this problem is very difficult, because it is probable that there exists both finite and infinite repetitions according to the numbers: for example, if we consider the number 23 of this sequence, it is probable that the number of element "23" is finite (see the comment in A082101 for the primes of form 2^k + 3^k). But, if we consider the number 113 of this sequence, is the number of the elements "113" infinite ? (see A057735 with the primes of the form 2+3^n). We observe that a(n) = 113 for n = 3, 14, 15, 24, 26,..., 123, 126, 139,..., 386, 391, 494, ....

Examples

			a(3) = 113 because 1^3+1^3+3^3 = 29 is prime.
		

Crossrefs

Cf. A020449.

Programs

  • Maple
    with(numtheory) :lst:={11, 101, 101111, 10011101, 10101101, 10110011, 10111001, 11000111, 11100101, 11110111, 11111101 }:for n from 1 to 300 do :ii:=0:for k from 1 to 10^8 while(ii=0) do:x:=convert(k,base,10):n1:=nops(x):it:=0:jj:=0:s:= sum('x[i]^n', 'i'=1..n1):lst1:={k} intersect lst:if type(k,prime)=true and type(s,prime)=true and (lst1<>{k}) then ii:=1: printf(`%d, `,k):else fi:od:od:
  • Mathematica
    Table[p = 2; While[d = IntegerDigits[p]; Union[d][[-1]] < 2 || ! PrimeQ[Total[d^n]],  p = NextPrime[p]]; p, {n, 60}]
  • PARI
    a(n)=forprime(p=2,,my(d=digits(p)); if(vecmax(d)>1 && isprime(sum(i=1,#d,d[i]^n)), return(p))) \\ Charles R Greathouse IV, Sep 19 2013

A172095 Integers k such that k-1,k,k+1 have few distinct primes: k=p^r, p odd prime, and (k^2-1)/8 divisible by at most two distinct prime factors.

Original entry on oeis.org

3, 5, 7, 9, 11, 13, 17, 19, 27, 37, 53, 107, 163, 243, 2187, 2917, 4373, 8747, 1594323, 86093443
Offset: 1

Views

Author

Dino Lorenzini (lorenzin(AT)uga.edu), Jan 25 2010

Keywords

Comments

Note the terms 3^1=3, 3^2=9, 3^3=27, 3^5=243, 3^7=2187, and 3^13=1594323. The other listed terms are prime.
Next term > 2^2000. - Max Alekseyev, Feb 16 2011

Crossrefs

Extensions

Edited and missing terms 3, 5, 9, 17 added by Max Alekseyev, Feb 16 2011

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

Original entry on oeis.org

0, 1, 3, 4, 5, 8, 15, 16, 29, 53, 56, 59, 64, 131, 179, 319, 695, 781, 821, 896, 1251, 1453, 4216, 5479, 6224, 7841, 12095, 13781, 17719, 43955, 64821, 82779, 105105, 152528, 165895, 191813, 529679, 1074725, 1086111, 1175231, 1277861, 1346541, 3123035, 3648968, 5570080, 6236771, 10852676
Offset: 1

Views

Author

Vincenzo Librandi, Sep 26 2012

Keywords

Examples

			3 is a term because 6*3^3 + 1 = 163 is prime.
7 is not a term because 6*3^7 + 1 = 13123 = 11*1193 is composite.
		

Crossrefs

Associated primes are in A111974.

Programs

  • Magma
    /* Gives only the terms up to 1453: */ [n: n in [0..1500] | IsPrime(6*3^n + 1)];
    
  • Mathematica
    Select[Range[5000], PrimeQ[6 3^# + 1] &]
  • PARI
    is(n)=ispseudoprime(6*3^n+1) \\ Charles R Greathouse IV, Jun 13 2017

Formula

a(n) = A003306(n+1)-1. - Bruno Berselli, Sep 27 2012

Extensions

More terms from Vincenzo Librandi, Oct 01 2012
a(41)-a(47) from the data at A003306 added by Amiram Eldar, Jul 18 2025
Showing 1-8 of 8 results.