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.

Previous Showing 41-50 of 53 results. Next

A319074 a(n) is the sum of the first n nonnegative powers of the n-th prime.

Original entry on oeis.org

1, 4, 31, 400, 16105, 402234, 25646167, 943531280, 81870575521, 15025258332150, 846949229880161, 182859777940000980, 23127577557875340733, 1759175174860440565844, 262246703278703657363377, 74543635579202247026882160, 21930887362370823132822661921, 2279217547342466764922495586798
Offset: 1

Views

Author

Omar E. Pol, Sep 11 2018

Keywords

Examples

			For n = 4 the 4th prime is 7 and the sum of the first four nonnegative powers of 7 is 7^0 + 7^1 + 7^2 + 7^3 = 1 + 7 + 49 + 343 = 400, so a(4) = 400.
		

Crossrefs

Programs

  • PARI
    a(n) = sum(k=0, n-1, prime(n)^k); \\ Michel Marcus, Sep 13 2018

Formula

a(n) = Sum_{k=0..n-1} A000040(n)^k.
a(n) = Sum_{k=0..n-1} A319075(k,n).
a(n) = (A000040(n)^n - 1)/(A000040(n) - 1).
a(n) = (A062457(n) - 1)/A006093(n).
a(n) = A069459(n)/A006093(n).
a(n) = A000203(A000040(n)^(n-1)).
a(n) = A000203(A093360(n)).

A325129 Heinz numbers of integer partitions into nonsquares (A087153).

Original entry on oeis.org

1, 3, 5, 9, 11, 13, 15, 17, 19, 25, 27, 29, 31, 33, 37, 39, 41, 43, 45, 47, 51, 55, 57, 59, 61, 65, 67, 71, 73, 75, 79, 81, 83, 85, 87, 89, 93, 95, 99, 101, 103, 107, 109, 111, 113, 117, 121, 123, 125, 127, 129, 131, 135, 137, 139, 141, 143, 145, 149, 153, 155
Offset: 1

Views

Author

Gus Wiseman, Apr 01 2019

Keywords

Comments

The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).

Examples

			The sequence of terms together with their prime indices begins:
   1: {}
   3: {2}
   5: {3}
   9: {2,2}
  11: {5}
  13: {6}
  15: {2,3}
  17: {7}
  19: {8}
  25: {3,3}
  27: {2,2,2}
  29: {10}
  31: {11}
  33: {2,5}
  37: {12}
  39: {2,6}
  41: {13}
  43: {14}
  45: {2,2,3}
		

Crossrefs

Programs

  • Mathematica
    Select[Range[100],!MemberQ[If[#==1,{},FactorInteger[#]],{p_,_}/;IntegerQ[Sqrt[PrimePi[p]]]]&]

A325132 Number of integer partitions of n where the multiplicity of each part k is at least prime(k).

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 2, 1, 3, 2, 4, 3, 5, 4, 6, 6, 7, 7, 10, 8, 11, 12, 12, 14, 17, 16, 20, 22, 24, 26, 31, 31, 37, 39, 43, 46, 54, 53, 63, 65, 73, 75, 87, 87, 100, 102, 115, 117, 133, 134, 151, 155, 172, 176, 197, 202, 223, 231, 254, 262, 290, 298, 327, 341, 370
Offset: 0

Views

Author

Gus Wiseman, Apr 01 2019

Keywords

Comments

The Heinz numbers of these partitions are given by A054744.

Examples

			The first few terms count the following integer partitions:
   0: ()
   2: (11)
   3: (111)
   4: (1111)
   5: (11111)
   6: (222)
   6: (111111)
   7: (1111111)
   8: (2222)
   8: (22211)
   8: (11111111)
   9: (222111)
   9: (111111111)
  10: (22222)
  10: (222211)
  10: (2221111)
  10: (1111111111)
  11: (2222111)
  11: (22211111)
  11: (11111111111)
  12: (222222)
  12: (2222211)
  12: (22221111)
  12: (222111111)
  12: (111111111111)
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],And@@Table[Count[#,i]>=Prime[i],{i,Union[#]}]&]],{n,0,30}]

Formula

G.f.: Product_{k>=1} (1 + x^(prime(k)*k) / (1 - x^k)). - Ilya Gutkovskiy, Nov 28 2020

A201614 Decimal expansion of Sum_{n = 1 .. infinity } (-1)^(n+1)/ prime(n)^n.

Original entry on oeis.org

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

Views

Author

Michel Lagneau, Dec 03 2011

Keywords

Examples

			0.39647840017672880132037721... = 1/2^1 - 1/3^2 + 1/5^3 - 1/7^4 + ...
		

Crossrefs

Programs

  • Maple
    with(numtheory): Digits:=105:s:=sum( evalf(((-1)^(n+1))/ ithprime(n)^n),n=1..200):print(s):
  • Mathematica
    digits = 105; NSum[(-1)^(n+1)/Prime[n//Round]^n, {n, 1, Infinity},  Method -> "AlternatingSigns", WorkingPrecision -> digits, NSumTerms -> digits] // RealDigits[#, 10, digits]& // First (* Jean-François Alcover, Feb 24 2014 *)

A271182 a(n) = prime(n)^(2*n) - prime(n)^(n-1).

Original entry on oeis.org

3, 78, 15600, 5764458, 25937409960, 23298084751188, 168377826535263360, 288441413566727295942, 3244150909895169974315088, 176994576151109738690640664532, 645590698195138072217104753157760, 43335257111193343900187118461545288548
Offset: 1

Views

Author

Wesley Ivan Hurt, Apr 07 2016

Keywords

Crossrefs

Programs

  • Magma
    [NthPrime(n)^(2*n)-NthPrime(n)^(n-1) : n in [1..12]];
    
  • Maple
    A271182:=n->ithprime(n)^(2*n)-ithprime(n)^(n-1): seq(A271182(n), n=1..15);
  • Mathematica
    Table[Prime[n]^(2*n) - Prime[n]^(n - 1), {n, 12}]
  • PARI
    a(n) = prime(n)^(2*n) - prime(n)^(n-1); \\ Altug Alkan, Apr 07 2016

Formula

a(n) = sigma(prime(n)^n) * phi(prime(n)^n) = A062354(A062457(n)).

A271440 a(n) = sigma(prime(n)^n) - phi(prime(n)^n).

Original entry on oeis.org

2, 7, 56, 743, 30746, 773527, 49783736, 1837403019, 160181560802, 29532404308019, 1666577516860962, 360777399719461393, 45691067858241526814, 3477439299142731351087, 518913689466371066697746, 147680787468230866751370317, 43490064769447225534580532962
Offset: 1

Views

Author

Wesley Ivan Hurt, Apr 07 2016

Keywords

Crossrefs

Cf. A000010 (phi), A000040 (primes), A000203 (sigma), A051612, A062457.

Programs

  • Maple
    with(numtheory): A271440:=n->sigma(ithprime(n)^n)-phi(ithprime(n)^n): seq(A271440(n), n=1..30);
  • Mathematica
    Table[DivisorSigma[1, Prime[n]^n] - EulerPhi[Prime[n]^n], {n, 20}]
    DivisorSigma[1,#]-EulerPhi[#]&/@Table[Prime[n]^n,{n,20}] (* Harvey P. Dale, Feb 07 2025 *)
  • PARI
    a(n) = sigma(prime(n)^n) - eulerphi(prime(n)^n); \\ Altug Alkan, Apr 08 2016

Formula

a(n) = (2*prime(n)^n-prime(n)^(n-1)-1) / (prime(n)-1).
a(n) = (prime(n)^(n+1)-prime(n)^(n-1)*(prime(n)-1)^2-1) / (prime(n)-1).
a(n) = A051612(A062457(n)) = A000203(A062457(n)) - A000010(A062457(n)).

A304917 a(n) = prime(n)^n - primorial(n - 1).

Original entry on oeis.org

1, 7, 119, 2371, 160841, 4824499, 410308643, 16983052531, 1801142961773, 420707010207331, 25408470426711601, 6582951805279545151, 925103094894275494511, 73885357039888240238239, 12063348337737606907045313, 3876269049503627062809380911
Offset: 1

Views

Author

David James Sycamore, May 20 2018

Keywords

Examples

			a(1) = prime(1)^1 - primorial(0) = 2^1 - 1 = 1.
		

Crossrefs

Cf. A002110, A062457, A305076 (n such that a(n) is prime).

Programs

  • Maple
    N:=15:
    for X from 1 to N do
    Z:=mul(ithprime(i),i=1..(X-1));
    Y:=(ithprime(X)^X-Z);
    print(Y);
    end do:
    # Second Maple program
    seq(ithprime(k)^k-mul(ithprime(i),i=1..k-1),k=1..15);  # Muniru A Asiru, Jul 08 2018
  • Mathematica
    Fold[Append[#1, {#1 - #2, #2} & @@ {Prime[#2]^#2, Prime[#2 - 1] #1[[-1, -1]]}] &, {{1, 1}}, Range[2, 16]][[All, 1]] (* Michael De Vlieger, Jul 19 2018 *)
  • PARI
    a(n) = prime(n)^n - factorback(primes(n - 1)) \\ David A. Corneth, May 21 2018

Formula

a(n) = A062457(n) - A002110(n-1).

A305076 Numbers k such that prime(k)^k - primorial(k - 1) is prime.

Original entry on oeis.org

2, 4, 5, 8, 9, 15, 29, 213, 666, 1360, 3932, 7916
Offset: 1

Views

Author

David James Sycamore, May 24 2018

Keywords

Comments

Numbers k such that A304917(k) is prime.
a(12) > 4000 if it exists.

Examples

			n = 1 gives 2 - 1 = 1. n=2 gives 3^2 - 2 = 7, so 2 is the first term.
		

Crossrefs

Programs

  • Maple
    N:=2000:
      for X from 1 to N do
    Z:=mul(ithprime(i),i=1..(X-1));
    Y:=(ithprime(X)^X - Z);
    if isprime(Y) then print(X);
    end if
    end do:
  • Mathematica
    Select[Range@ 700, PrimeQ[Prime[#]^# - Product[Prime@ i, {i, # - 1}]] &] (* Michael De Vlieger, Jul 19 2018 *)
  • PARI
    isok(k) = isprime(prime(k)^k - prod(j=1, k-1, prime(j))); \\ Michel Marcus, Jun 09 2018

Extensions

a(12) from Michael S. Branicky, Jun 11 2024

A130606 a(n) = prime(n+1)^n - prime(n)^n where prime(n) is the n-th prime number.

Original entry on oeis.org

1, 16, 218, 12240, 210242, 19310760, 483533066, 61327422240, 12705993314406, 398921053680600, 152509144883055582, 15980538294526150800, 793161021967277155922, 182781628843528905568920, 61073803538208251485772814
Offset: 1

Views

Author

Cino Hilliard, Jun 17 2007

Keywords

Examples

			For n=2, prime(2+1)^2 - prime(2)^2 = 5^2 - 3^2 = 4^2, the second entry.
		

Programs

  • Maple
    a := proc (n) options operator, arrow; ithprime(n+1)^n-ithprime(n)^n end proc: seq(a(n), n = 1 .. 15); # Emeric Deutsch, Jul 09 2007
  • Mathematica
    n[x_]:=Module[{pn=Prime[x]},(NextPrime[pn])^x-pn^x]; n/@Range[20]  (* Harvey P. Dale, Apr 11 2011 *)
  • PARI
    g1(n) = for(x=1,n,y=prime(x+1)^x-prime(x)^x;print1(y","))

Formula

a(n) = A093360(n+1) - A062457(n). - R. J. Mathar, Nov 25 2008

Extensions

More terms from Emeric Deutsch, Jul 09 2007

A130607 a(n) = prime(n+1)^n + prime(n)^n.

Original entry on oeis.org

5, 34, 468, 17042, 532344, 28964378, 1304210412, 95294548322, 16308298637332, 1240335520281002, 203326098675865244, 29146442306206221362, 2643367226597304414564, 330552343531805913099818, 85200500239848987963203500, 25435446457194919247155743362, 3513844792272393084250431362040
Offset: 1

Views

Author

Cino Hilliard, Jun 17 2007

Keywords

Comments

Prime(n) is the n-th prime number.

Examples

			For n=2, prime(2+1)^2 - prime(2)^2 = 5^2 + 3^2 = 34, the second term.
		

Crossrefs

Programs

  • Mathematica
    Table[Prime[n+1]^n + Prime[n]^n, {n, 1, 20}] (* Amiram Eldar, Jun 30 2024 *)
  • PARI
    g2(n) = for(x=1,n,y=prime(x+1)^x+prime(x)^x;print1(y","))

Formula

a(n) = A062457(n) + A093360(n+1). - Amiram Eldar, Jun 30 2024

Extensions

More terms from Amiram Eldar, Jun 30 2024
Previous Showing 41-50 of 53 results. Next