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

A003307 Numbers k such that 2*3^k - 1 is prime.

Original entry on oeis.org

1, 2, 3, 7, 8, 12, 20, 23, 27, 35, 56, 62, 68, 131, 222, 384, 387, 579, 644, 1772, 3751, 5270, 6335, 8544, 9204, 12312, 18806, 21114, 49340, 75551, 90012, 128295, 143552, 147488, 1010743, 1063844, 1360104
Offset: 1

Views

Author

Keywords

References

  • R. K. Guy, Unsolved Problems in Theory of Numbers, Section A3.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A079363 (primes of the form 2*3^k - 1), A003306 (k such that 2*3^k + 1 is prime).

Programs

Extensions

More terms from Douglas Burke (dburke(AT)nevada.edu)
More terms from T. D. Noe, Aug 24 2005
Corrected and extended by Herman Jamke (hermanjamke(AT)fastmail.fm), Jan 05 2008
a(35) from Borys Jaworski, Sep 02 2011
a(36) from Borys Jaworski, Feb 13 2012
a(37) from Jeppe Stig Nielsen, Sep 28 2018

A163667 Numbers n such that sigma(n) = 9*phi(n).

Original entry on oeis.org

30, 264, 714, 3080, 3828, 6678, 10098, 12648, 21318, 22152, 24882, 44660, 49938, 61344, 86304, 94944, 118296, 129504, 130356, 147560, 183396, 199386, 201756, 207264, 216936, 248710, 258440, 265914, 275196, 290290, 321204, 505164, 628776, 706266, 706836
Offset: 1

Views

Author

Keywords

Comments

This sequence is a subsequence of A011257 because sqrt(phi(n)*sigma(n)) = 3*phi(n).
If 2^p-1 and 2*3^k-1 are two primes greater than 5 then n = 2^(p-2)*(2^p-1)*3^(k-1)*(2*3^k-1) (the product of two relatively prime terms 2^(p-2)*(2^p-1) and 3^(k-1)*(2*3^k-1) of A011257) is in the sequence. The proof is easy.

Crossrefs

Programs

  • Mathematica
    Select[Range[700000],DivisorSigma[1,# ]==9EulerPhi[ # ]&]
  • PARI
    is(n)=sigma(n)==9*eulerphi(n) \\ Charles R Greathouse IV, May 09 2013

A120378 Integers n such that 2*11^n-1 is prime.

Original entry on oeis.org

2, 8, 248, 2474, 2900, 6600, 24746, 105704
Offset: 1

Views

Author

Walter Kehowski, Jun 28 2006

Keywords

Comments

See comments for A057472. Examined in base 12, all n must be even and all primes must be 1-primes. For example, 241 is 181 in base 12.
a(9) > 2*10^5. - Robert Price, Nov 06 2015

Examples

			a(1)=2 since 2*11^2-1=241 is the first prime of this form.
		

Crossrefs

Programs

  • Maple
    for w to 1 do for k from 1 to 2000 do n:=2*11^k-1; if isprime(n) then printf("%d, %d",k,n) fi od od;
  • Mathematica
    Select[Range[0, 200000], PrimeQ[2*11^# - 1] &] (* Robert Price, Nov 06 2015 *)

Formula

a(n) = n-th integer k such that 2*11^k-1 is prime.

Extensions

More terms from Ryan Propper, Jan 14 2008
a(7)-a(8) from Robert Price, Nov 06 2015

A120375 Integers k such that 2*5^k - 1 is prime.

Original entry on oeis.org

4, 6, 16, 24, 30, 54, 96, 178, 274, 1332, 2766, 3060, 4204, 17736, 190062, 223536, 260400, 683080
Offset: 1

Views

Author

Walter Kehowski, Jun 28 2006

Keywords

Comments

See comments for A057472. Examined in base 12, all n must be even and all primes must be 1-primes. For example, 1249 is 881 in base 12.
a(16) > 2*10^5. - Robert Price, Mar 14 2015

Examples

			a(1) = 4 since 2*5^4 - 1 = 1249 is the first prime.
		

Crossrefs

Integers k such that 2*b^k - 1 is prime: A090748 (b=2), A003307 (b=3), this sequence (b=5), A057472 (b=6), A002959 (b=7), A002957 (b=10), A120378 (b=11).
Primes of the form 2*b^k - 1: A000668 (b=2), A079363 (b=3), A120376 (b=5), A158795 (b=7), A055558 (b=10), A120377 (b=11).
Cf. also A000043, A002958.

Programs

  • Magma
    [n: n in [0..2800] |IsPrime(2*5^n - 1)]; // Vincenzo Librandi, Sep 23 2018
  • Maple
    for w to 1 do for k from 1 to 2000 do n:=2*5^k-1; if isprime(n) then printf("%d, %d ",k,n) fi od od;
  • Mathematica
    Select[Range[0, 100], PrimeQ[2*5^# - 1] &] (* Robert Price, Mar 14 2015 *)
  • PARI
    isok(k) = ispseudoprime(2*5^k-1); \\ Altug Alkan, Sep 22 2018
    

Formula

a(n) = 2*A002958(n).

Extensions

More terms from Ryan Propper, Mar 28 2007
a(14) from Herman Jamke (hermanjamke(AT)fastmail.fm), May 02 2007
a(15) from Robert Price, Mar 14 2015
a(16)-a(18) from Jorge Coveiro and Tyler NeSmith, Jun 14 2020

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}]

A120377 Primes of the form 2*11^k-1.

Original entry on oeis.org

241, 428717761
Offset: 1

Views

Author

Walter Kehowski, Jun 28 2006

Keywords

Comments

See comments for A057472. Examined in base 12, all n must be even and all primes must be 1-primes. For example, 241 is 181 in base 12.
The values of k < 1000 that yield primes are 2, 8, 248. - T. D. Noe, Nov 16 2006

Examples

			a(1) = 241 since 2*11^2-1 = 241 is the first prime.
		

Crossrefs

Programs

  • Maple
    for w to 1 do for k from 1 to 2000 do n:=2*11^k-1; if isprime(n) then printf("%d, %d",k,n) fi od od;
  • Mathematica
    Select[2*11^Range[1000]-1, PrimeQ] (* T. D. Noe, Nov 16 2006 *)

Formula

a(n) = n-th number such that 2*11^k-1 that is prime for some k.
a(n) = 2*11^A120378(n)-1. - R. J. Mathar, Mar 06 2010

Extensions

Corrected by T. D. Noe, Nov 16 2006

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}]

A079362 Sequence of sums of alternating powers of 3.

Original entry on oeis.org

1, 4, 5, 14, 17, 44, 53, 134, 161, 404, 485, 1214, 1457, 3644, 4373, 10934, 13121, 32804, 39365, 98414, 118097, 295244, 354293, 885734, 1062881, 2657204, 3188645, 7971614, 9565937, 23914844, 28697813, 71744534, 86093441, 215233604
Offset: 1

Views

Author

Cino Hilliard, Feb 15 2003

Keywords

Crossrefs

Cf. A079360, A079363, A028242, A048473 (bisection).

Programs

  • GAP
    a:=[1,4,5];; for n in [4..30] do a[n]:=a[n-1]+3*a[n-2]-3*a[n-3]; od; a; # G. C. Greubel, Aug 07 2019
  • Magma
    I:=[1,4,5]; [n le 3 select I[n] else Self(n-1) +3*Self(n-2) -3*Self(n-3): n in [1..40]]; // G. C. Greubel, Aug 07 2019
    
  • Maple
    a[1]:=1:a[2]:=4:for n from 3 to 100 do a[n]:=3*a[n-2]+2 od: seq(a[n], n=1..33); # Zerinvary Lajos, Mar 17 2008
  • Mathematica
    LinearRecurrence[{1,3,-3},{1,4,5},40] (* Harvey P. Dale, Oct 18 2016 *)
  • PARI
    a(n)=if(n<1,0,1+sum(k=2,n,3^((k\2)-(k%2))))
    
  • PARI
    a(n)=if(n<0,0,(5/3-3*n%2)*2^ceil(n/2)-1)
    
  • Sage
    @CachedFunction
    def a(n):
        if (n==0): return 1
        elif (1<=n<=2): return n+3
        else: return a(n-1) + 3*a(n-2) - 3*a(n-3)
    [a(n) for n in (0..40)] # G. C. Greubel, Aug 07 2019
    

Formula

G.f.: x*(1+3*x-2*x^2)/((1-x)*(1-3*x^2)). - Michael Somos, Feb 18 2003
For n >= 1, a(2n-1) = (2/3)*3^n - 1, a(2n) = (5/3)*3^n - 1. - Benoit Cloitre, Feb 16 2003

A120376 Primes of the form 2*5^k - 1.

Original entry on oeis.org

1249, 31249, 305175781249, 119209289550781249, 1862645149230957031249, 111022302462515654042363166809082031249, 25243548967072377773175314089049159349542605923488736152648925781249
Offset: 1

Views

Author

Walter Kehowski, Jun 28 2006

Keywords

Comments

See comments for A057472. Examined in base 12, all n must be even and all primes must be 1-primes. For example, 1249 is 881 in base 12.
The next term has 125 digits. - Harvey P. Dale, Jan 26 2019

Examples

			a(1) = 4 since 2*5^4 - 1 = 1249 is the first prime.
		

Crossrefs

Integers k such that 2*b^k - 1 is prime: A090748 (b=2), A003307 (b=3), A120375 (b=5), A057472 (b=6), A002959 (b=7), A002957 (b=10), A120378 (b=11).
Primes of the form 2*b^k - 1: A000668 (b=2), A079363 (b=3), this sequence (b=5), A158795 (b=7), A055558 (b=10), A120377 (b=11).
Cf. also A000043, A002958.

Programs

  • Maple
    for w to 1 do for k from 1 to 2000 do n:=2*5^k-1; if isprime(n) then printf("%d, %d",k,n) fi od od;
  • Mathematica
    Select[2*5^Range[100]-1,PrimeQ] (* Harvey P. Dale, Jan 26 2019 *)
  • PARI
    for(k=1, 1e3, if(ispseudoprime(p=2*5^k-1), print1(p, ", "))); \\ Altug Alkan, Sep 22 2018

Formula

a(n) = 2*5^A120375(n) - 1 = 2*5^(2*A002958(n)) - 1. - Jianing Song, Sep 22 2018

A293356 Even integers k such that lambda(sum of even divisors of k) = sum of odd divisors of k.

Original entry on oeis.org

2, 20, 40, 48, 68, 176, 212, 304, 328, 944, 1360, 1712, 1888, 2320, 2344, 2864, 4240, 7120, 7888, 7984, 8448, 8960, 11920, 12032, 14416, 14592, 15536, 17492, 20224, 21520, 23984, 24208, 24592, 25904, 26112, 28160, 29440, 30464, 34560, 35920, 36352, 40528, 41296
Offset: 1

Views

Author

Michel Lagneau, Oct 07 2017

Keywords

Comments

Or even integers k such that A002322(A146076(k)) = A000593(k).
Observations:
The primes a(n)/4: {5, 17, 53, 4373, 13121, ...} are of the form 2*3^m - 1, m > 0 (A079363).
The primes a(n)/8: {5, 41, 293, 4941257, ...} are of the form 6*7^m - 1, m = 0, 1, ... (primes in A198688).
The set of the primes {a(n)/16} = {3, 11, 19, 59, 107, 179, 499, 971, 1499, 1619, ...} contains the primes of the form 4*3^(2m+1) - 1 = {11, 107, 971, ...}, m = 0, 1, ...

Examples

			68 is in the sequence because A002322(A146076(68)) = A002322(108) = 18 and A000593(68) = 18.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    for n from 2 by 2 to 10^6 do:
    x:=divisors(n):n1:=nops(x):s0:=0:s1:=0:
       for k from 1 to n1 do:
        if type(x[k],even)
         then
         s0:=s0+ x[k]:
         else
         s1:=s1+ x[k]:
        fi:
      od:
        if s1=lambda(s0)
         then
         printf(`%d, `,n):
         else
        fi:
    od:
  • Mathematica
    fQ[n_] :=
    Block[{d = Divisors@n},
      CarmichaelLambda[Plus @@ Select[d, EvenQ]] ==
    Plus @@ Select[d, OddQ]]; Select[2 Range@2000, fQ] (* Robert G. Wilson v, Oct 07 2017 *)
  • PARI
    is(n)=if(n%2, return(0)); my(s=valuation(n,2),d=sigma(n>>s)); lcm(znstar(d*(2^(s+1)-2))[2])==d \\ Charles R Greathouse IV, Dec 26 2017

Extensions

Edited by Robert Israel, Dec 28 2017
Showing 1-10 of 12 results. Next