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 21-30 of 52 results. Next

A139116 a(n) = p*(p-1)/2, where p is A000043(n).

Original entry on oeis.org

1, 3, 10, 21, 78, 136, 171, 465, 1830, 3916, 5671, 8001, 135460, 183921, 817281, 2425503, 2600340, 5172936, 9041878, 9779253, 46933516, 49406770, 62860078, 198732016, 235455850, 269317236, 989969256, 3718884403, 6105401253, 8718403176, 23347552095, 286402257541
Offset: 1

Views

Author

Omar E. Pol, May 10 2008

Keywords

Crossrefs

Programs

  • Mathematica
    (#(#-1))/2&/@MersennePrimeExponent[Range[47]] (* Harvey P. Dale, Aug 13 2021 *)

Formula

a(n) = A000043(n)*(A000043(n)-1)/2.

Extensions

a(24)-a(32) from Harvey P. Dale, Aug 13 2021

A117495 Product of a prime number p and the number of primes smaller than p.

Original entry on oeis.org

0, 3, 10, 21, 44, 65, 102, 133, 184, 261, 310, 407, 492, 559, 658, 795, 944, 1037, 1206, 1349, 1460, 1659, 1826, 2047, 2328, 2525, 2678, 2889, 3052, 3277, 3810, 4061, 4384, 4587, 5066, 5285, 5652, 6031, 6346, 6747, 7160, 7421, 8022, 8299, 8668, 8955, 9706
Offset: 1

Views

Author

Luc Stevens (lms022(AT)yahoo.com), Apr 25 2006

Keywords

Examples

			a(9) = 184 because (1) the 9th prime number is 23, (2) there are 8 primes smaller than 23 and (3) 23*8 = 184.
		

Crossrefs

Programs

  • Maple
    with(numtheory):a:=n->sum(ithprime(n), j=2..n):seq(a(n), n=1..47); # Zerinvary Lajos, Aug 24 2008
  • Mathematica
    Table[(n - 1)Prime[n], {n, 60}] (* Zak Seidov, Aug 15 2010 *)
  • PARI
    a(n)=prime(n)*(n-1) \\ Charles R Greathouse IV, Sep 15 2014

Formula

a(n) = (n-1)*prime(n). - Zak Seidov, Aug 15 2010

Extensions

a(31) corrected by Jens Kruse Andersen, Sep 15 2014

A127922 1/24 of product of three numbers: n-th prime, previous and following number.

Original entry on oeis.org

1, 5, 14, 55, 91, 204, 285, 506, 1015, 1240, 2109, 2870, 3311, 4324, 6201, 8555, 9455, 12529, 14910, 16206, 20540, 23821, 29370, 38024, 42925, 45526, 51039, 53955, 60116, 85344, 93665, 107134, 111895, 137825, 143450, 161239, 180441, 194054
Offset: 2

Views

Author

Artur Jasinski, Feb 06 2007

Keywords

Comments

The product of (n-1), n, and (n+1) = n^3 - n. - Harvey P. Dale, Jan 17 2011
For n > 2, a(n) = A001318(n-2) * A007310(n-1), if A007310(n-1) is prime. Also a(n) is a subsequence of A000330. - Richard R. Forberg, Dec 25 2013
If p is an odd prime it can always be the side length of a leg of a primitive Pythagorean triangle. However it constrains the other leg to have a side length of (p^2-1)/2 and the hypotenuse to have a side length of (p^2+1)/2. The resulting triangle has an area equal to (p-1)*p*(p+1)/4. a(n) is 1/6 the area of such triangles. - Frank M Jackson, Dec 06 2017

Crossrefs

Programs

  • Mathematica
    Table[(Prime[n] + 1) Prime[n](Prime[n] - 1)/24, {n, 1, 100}] (#^3-#)/ 24&/@ Prime[Range[2,40]] (* Harvey P. Dale, Jan 17 2011 *)
    ((#-1)#(#+1))/24&/@Prime[Range[2,40]] (* Harvey P. Dale, Jan 20 2023 *)
  • PARI
    for(n=2,25, print1((prime(n)+1)*prime(n)*(prime(n)-1)/24, ", ")) \\ G. C. Greubel, Jun 19 2017

Formula

a(n) = A011842(A000040(n) + 1) = A000330((A000040(n) - 1) / 2).

A139115 a(n) = p*(p - 1), where p is A000043(n).

Original entry on oeis.org

2, 6, 20, 42, 156, 272, 342, 930, 3660, 7832, 11342, 16002, 270920, 367842, 1634562, 4851006, 5200680, 10345872, 18083756, 19558506, 93867032, 98813540, 125720156, 397464032, 470911700, 538634472, 1979938512, 7437768806, 12210802506
Offset: 1

Views

Author

Omar E. Pol, May 10 2008

Keywords

Crossrefs

Programs

  • Mathematica
    #(#-1)&/@MersennePrimeExponent[Range[30]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jan 15 2020 *)

Formula

a(n) = A000043(n)*(A000043(n) - 1).

Extensions

More terms from Vincenzo Librandi, May 11 2010

A139223 M*(M-1), where M is Mersenne prime A000668(n).

Original entry on oeis.org

6, 42, 930, 16002, 67084290, 17179475970, 274876334082, 4611686011984936962, 5316911983139663484697699213480296450, 383123885216472214589586754930667236976614368197214210
Offset: 1

Views

Author

Omar E. Pol, May 10 2008

Keywords

Crossrefs

Formula

a(n) = A000668(n)*(A000668(n)-1).

Extensions

More terms from R. J. Mathar, Jun 24 2009

A139225 M(M-1)/3, where M is Mersenne prime A000668(n).

Original entry on oeis.org

2, 14, 310, 5334, 22361430, 5726491990, 91625444694, 1537228670661645654, 1772303994379887828232566404493432150, 127707961738824071529862251643555745658871456065738070, 8776024305713098891493168973639040433964428736682367693182293334, 9649340769776349618630915417390658987602357538676244438223111363610210030934
Offset: 1

Views

Author

Omar E. Pol, May 10 2008

Keywords

Comments

Terms from a(13) on have 314 or more digits and are not listed for that reason. - R. J. Mathar, May 11 2008

Crossrefs

Formula

a(n)=A000668(n)*(A000668(n)-1)/3.

Extensions

More terms from R. J. Mathar, May 11 2008

A139226 M(M-1)/6, where M is Mersenne prime A000668(n).

Original entry on oeis.org

1, 7, 155, 2667, 11180715, 2863245995, 45812722347, 768614335330822827, 886151997189943914116283202246716075, 63853980869412035764931125821777872829435728032869035, 4388012152856549445746584486819520216982214368341183846591146667, 4824670384888174809315457708695329493801178769338122219111555681805105015467
Offset: 1

Views

Author

Omar E. Pol, May 10 2008

Keywords

Comments

Perfect number A000396(n) minus Mersenne prime A000668(n), divided by 3.
Terms from a(13) on have 313 or more digits and are not listed for that reason. - R. J. Mathar, May 11 2008

Crossrefs

Formula

a(n) = A000668(n)*(A000668(n)-1)/6 = A139223(n)/6 = A139224(n)/3.
a(n) = (A000396(n)-A000668(n))/3.

Extensions

More terms from R. J. Mathar, May 11 2008

A257252 Transpose of square array A257251.

Original entry on oeis.org

2, 6, 2, 20, 6, 2, 42, 10, 6, 2, 110, 28, 20, 6, 2, 156, 22, 14, 10, 6, 2, 272, 52, 44, 28, 20, 6, 2, 342, 34, 26, 22, 14, 10, 6, 2, 506, 76, 68, 52, 44, 28, 20, 6, 2, 812, 138, 114, 102, 78, 66, 42, 10, 6, 2, 930, 58, 46, 38, 34, 26, 22, 14, 20, 6, 2, 1332, 186, 174, 138, 114, 102, 78, 66, 42, 10, 6, 2
Offset: 1

Views

Author

Antti Karttunen, Apr 29 2015

Keywords

Comments

See A257251.

Examples

			The top left corner of the array:
  2, 6, 20, 42, 110, 156, 272, 342, 506, 812, 930, 1332
  2, 6, 10, 28,  22,  52,  34,  76, 138,  58, 186,  148
  2, 6, 20, 14,  44,  26,  68, 114,  46, 174, 124,   74
  2, 6, 10, 28,  22,  52, 102,  38, 138, 116,  62,  148
  2, 6, 20, 14,  44,  78,  34, 114,  92,  58, 124,  222
  2, 6, 10, 28,  66,  26, 102,  76,  46, 116, 186,  222
  2, 6, 20, 42,  22,  78,  68,  38,  92, 174, 186,   74
  2, 6, 10, 14,  66,  52,  34,  76, 138, 174,  62,  222
  2, 6, 20, 42,  44,  26,  68, 114, 138,  58, 186,  148
  2, 6, 10, 28,  22,  52, 102, 114,  46, 174, 124,   74
  2, 6, 20, 14,  44,  78, 102,  38, 138, 116,  62,  222
  2, 6, 10, 28,  66,  78,  34, 114,  92,  58, 186,  148
  2, 6, 20, 14,  66,  26, 102,  76,  46, 174, 124,  222
  2, 6, 10, 28,  22,  78,  68,  38, 138, 116, 186,  296
  2, 6, 20, 42,  66,  52,  34, 114,  92, 174, 248,  148
  2, 6, 10, 14,  44,  26, 102,  76, 138, 232, 124,   74
  ...
		

Crossrefs

Transpose: A257251.
Row 1: A036689.
Cf. also A083140, A257254 (same array but with terms divided by 2).

Programs

A138416 a(n) = (p^3 - p^2)/2, where p = prime(n).

Original entry on oeis.org

2, 9, 50, 147, 605, 1014, 2312, 3249, 5819, 11774, 14415, 24642, 33620, 38829, 50807, 73034, 100949, 111630, 148137, 176435, 191844, 243399, 282449, 348524, 451632, 510050, 541059, 606797, 641574, 715064, 1016127, 1115465, 1276292, 1333149
Offset: 1

Views

Author

Artur Jasinski, Mar 19 2008

Keywords

Comments

Differences (p^k - p^m)/q with k > m:
expression OEIS sequence
-------------- -------------
p^2 - p A036689
(p^2 - p)/2 A008837
p^3 - p A127917
(p^3 - p)/2 A127918
(p^3 - p)/3 A127919
(p^3 - p)/6 A127920
p^3 - p^2 A135177
(p^3 - p^2)/2 this sequence
p^4 - p A138401
(p^4 - p)/2 A138417
p^4 - p^2 A138402
(p^4 - p^2)/2 A138418
(p^4 - p^2)/3 A138419
(p^4 - p^2)/4 A138420
(p^4 - p^2)/6 A138421
(p^4 - p^2)/12 A138422
p^4 - p^3 A138403
(p^4 - p^3)/2 A138423
p^5 - p A138404
(p^5 - p)/2 A138424
(p^5 - p)/3 A138425
(p^5 - p)/5 A138426
(p^5 - p)/6 A138427
(p^5 - p)/10 A138428
(p^5 - p)/15 A138429
(p^5 - p)/30 A138430
p^5 - p^2 A138405
(p^5 - p^2)/2 A138431
p^5 - p^3 A138406
(p^5 - p^3)/2 A138432
(p^5 - p^3)/3 A138433
(p^5 - p^3)/4 A138434
(p^5 - p^3)/6 A138435
(p^5 - p^3)/8 A138436
(p^5 - p^3)/12 A138437
(p^5 - p^3)/24 A138438
p^5 - p^4 A138407
(p^5 - p^4)/2 A138439
p^6 - p A138408
(p^6 - p)/2 A138440
p^6 - p^2 A138409
(p^6 - p^2)/2 A138441
(p^6 - p^2)/3 A138442
(p^6 - p^2)/4 A138443
(p^6 - p^2)/5 A138444
(p^6 - p^2)/6 A138445
(p^6 - p^2)/10 A138446
(p^6 - p^2)/12 A138447
(p^6 - p^2)/15 A138448
(p^6 - p^2)/20 A122220
(p^6 - p^2)/30 A138450
(p^6 - p^2)/60 A138451
p^6 - p^3 A138410
(p^6 - p^3)/2 A138452
p^6 - p^4 A138411
(p^6 - p^4)/2 A138453
(p^6 - p^4)/3 A138454
(p^6 - p^4)/4 A138455
(p^6 - p^4)/6 A138456
(p^6 - p^4)/8 A138457
(p^6 - p^4)/12 A138458
(p^6 - p^4)/24 A138459
p^6 - p^5 A138412
(p^6 - p^5)/2 A138460
.
We can prove that for n>1, a(n) is the remainder of the Euclidean division of Sum_{k=0..p-1} k^p by p^3 where p = prime(n). - Pierre Vandaële, Nov 30 2024

Programs

  • Magma
    [(p^3-p^2)/2: p in PrimesUpTo(1000)]; // Vincenzo Librandi, Jun 17 2011
  • Mathematica
    a = {}; Do[p = Prime[n]; AppendTo[a, (p^3 - p^2)/2], {n, 1, 50}]; a
    (#^3-#^2)/2&/@Prime[Range[50]] (* Harvey P. Dale, Nov 01 2020 *)
  • PARI
    forprime(p=2,1e3,print1((p^3-p^2)/2", ")) \\ Charles R Greathouse IV, Jun 16 2011
    

Extensions

Definition corrected by T. D. Noe, Aug 25 2008

A174857 The minimum distance k > 0 such that A020639(n+k) = A020639(n).

Original entry on oeis.org

2, 6, 2, 20, 2, 42, 2, 6, 2, 110, 2, 156, 2, 6, 2, 272, 2, 342, 2, 6, 2, 506, 2, 10, 2, 6, 2, 812, 2, 930, 2, 6, 2, 20, 2, 1332, 2, 6, 2, 1640, 2, 1806, 2, 6, 2, 2162, 2, 28, 2, 6, 2, 2756, 2, 10, 2, 6, 2, 3422, 2, 3660, 2, 6, 2, 20, 2, 4422, 2, 6, 2, 4970, 2, 5256, 2, 6, 2, 14, 2, 6162
Offset: 2

Views

Author

Vladimir Shevelev, Mar 31 2010

Keywords

Comments

The sequence has the same records as A002618.

Crossrefs

Programs

  • Maple
    A174857 := proc(n) local k,aref ; aref := A020639(n) ; for k from 1 do if A020639(n+k) = aref then return k; end if; end do: end proc:
    seq(A174857(n),n=2..80) ; # R. J. Mathar, Dec 07 2010
  • Mathematica
    Block[{s = Array[FactorInteger[#][[1, 1]] &, 10^4]}, Array[If[EvenQ[#], 2, Block[{k = 1, n = s[[#]]}, While[n != s[[# + k]], k++; If[# + k > Length[s], AppendTo[s, FactorInteger[# + k][[1, 1]] ]] ]; k]] &, 78, 2]] (* Michael De Vlieger, Apr 06 2021 *)
  • PARI
    A020639(n) = if(1==n, n, factor(n)[1, 1]);
    A174857(n) = if(isprime(n), (n-1)*n, my(spf=A020639(n)); for(k=1,oo,if(A020639(n+k)==spf,return(k)))); \\ Antti Karttunen, Apr 06 2021

Formula

If n is even, then a(n) = 2.
If n = 3k and A020639(k) >= 3, then a(n) = 6.
If n is prime, then a(n) = A036689(n).
Previous Showing 21-30 of 52 results. Next