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 31-40 of 52 results. Next

A117962 Partial sums of hexagonal numbers with prime indices.

Original entry on oeis.org

6, 21, 66, 157, 388, 713, 1274, 1977, 3012, 4665, 6556, 9257, 12578, 16233, 20604, 26169, 33072, 40453, 49364, 59375, 69960, 82363, 96058, 111811, 130532, 150833, 171948, 194739, 218392, 243817, 275948, 310139, 347540, 386043, 430296, 475747
Offset: 1

Views

Author

Jonathan Vos Post, Apr 05 2006

Keywords

Comments

There are no prime hexagonal numbers. The n-th hexagonal number A000384(n) = n*(2*n-1) is semiprime iff both n and 2*n-1 are prime iff A000384(n) is an element of A001358 iff n is an element of A005382.

Examples

			a(4) = hexagonal(2) + hexagonal(3) + hexagonal(5) + hexagonal(7) = 6 + 15 + 45 + 91 = 157 is prime.
a(12) = 6 + 15 + 45 + 91 + 231 + 325 + 561 + 703 + 1035 + 1653 + 1891 + 2701 = 9257 is prime.
a(26) = 150833 is prime.
		

Crossrefs

See also: A034953 Triangular numbers (A000217) with prime indices. A001248 Squares of primes. A116995 Pentagonal numbers with prime indices. A000384 Hexagonal numbers: n(2n-1). A117961 Hexagonal numbers with prime indices. A117965 Prime partial sums of hexagonal numbers with prime indices.

Programs

  • Mathematica
    Accumulate[Table[n(2n-1),{n,Prime[Range[50]]}]] (* Harvey P. Dale, Jan 30 2014 *)

Formula

a(n) = SUM[i=1..n] A117961(i). a(n) = SUM[i=1..n] A000040(i)*(2*A000040(i)-1). a(n) = SUM[i=1..n] A000384(prime(n)). a(n) = Partial sum of number of divisors of 12^(prime(n)-1) = SUM[i=1..n] A000005(A001021(A000040(n)-1)).

A133205 Fully multiplicative with a(p) = p*(p+1)/2 for prime p.

Original entry on oeis.org

1, 3, 6, 9, 15, 18, 28, 27, 36, 45, 66, 54, 91, 84, 90, 81, 153, 108, 190, 135, 168, 198, 276, 162, 225, 273, 216, 252, 435, 270, 496, 243, 396, 459, 420, 324, 703, 570, 546, 405, 861, 504, 946, 594, 540, 828, 1128, 486, 784, 675, 918, 819, 1431, 648, 990, 756
Offset: 1

Views

Author

Jonathan Vos Post, Oct 10 2007

Keywords

Comments

There are analogs with the triangular numbers replaced by some other sequence, but this was chosen because of the parity coincidences of A034953.

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := (p*(p + 1)/2)^e; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 60] (* Amiram Eldar, Dec 24 2022 *)
  • PARI
    a(n)=my(f=factor(n));prod(i=1,#f[,1],binomial(f[i,1]+1,2)^f[i,2]) /* Charles R Greathouse IV, Sep 09 2010 */
    
  • PARI
    for(n=1, 100, print1(direuler(p=2, n, 1 + (p^2 + p) / (2/X - p^2 - p))[n], ", ")) \\ Vaclav Kotesovec, Apr 05 2023

Formula

a((p_1)^(e_1)*(p_2)^(e_2)*...*(p_k)^(e_k)) = T(p_1)^(e_1)*T(p_2)^(e_2)*...*T(p_k)^(e_k), where T(i) = A000217(i). a(prime(i)) = A034953(i).
Sum_{n>=1} 1/a(n) = Product_{p prime} (1 - 2/(p*(p+1)))^(-1) = 2.12007865309570462566... . - Amiram Eldar, Dec 24 2022
Dirichlet g.f.: Product_{p prime} (1 + (p^2 + p) / (2*p^s - p^2 - p)). - Vaclav Kotesovec, Apr 05 2023
a(n) = A167338(n)/A061142(n). - Vaclav Kotesovec, Jan 28 2025
Conjecture: Sum_{k=1..n} a(k) = O(n^3/log(n)). - Vaclav Kotesovec, Jan 28 2025

A144549 Triangular numbers p*(p+1)/2 with p prime such that 1+(number of prime factors of p+1) is prime.

Original entry on oeis.org

3, 6, 15, 91, 276, 703, 1431, 1770, 1891, 2701, 3486, 4005, 5356, 8646, 9730, 11175, 11476, 12403, 18721, 19503, 24976, 25878, 27261, 28680, 38503, 43071, 47278, 49141, 60378, 61075, 64620, 72010, 75855, 79003, 88831, 98346, 104653, 106491
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Dec 31 2008

Keywords

Comments

Triangular numbers n(n+1)/2 such that n and A073093(n+1) are both prime.

Examples

			3 has one prime factor; 1+1 = 2 is prime, hence 2*3/2 = 3 is in the sequence.
14 = 2*7 has two prime factors; 1+2 = 3 is prime, hence 13*14/2 = 91 is in the sequence.
24 = 2*2*2*3 has four prime factors; 1+4 = 5 is prime, hence 23*24/2 = 276 is in the sequence.
		

Crossrefs

Cf. A000217 (triangular numbers), A000040 (prime numbers), A001222 (number of prime divisors of n), A073093.
Subsequence of A034953. - R. J. Mathar, Jan 03 2009

Programs

  • Magma
    [ p*(p+1)/2: p in PrimesUpTo(490) | IsPrime(1 + &+[ f[2]: f in Factorization(p+1) ]) ];
  • Mathematica
    aQ[n_] := PrimeQ[n] && PrimeQ[PrimeOmega[n + 1] + 1]; p = Select[Range[470], aQ]; p*(p + 1)/2 (* Amiram Eldar, Aug 31 2019 *)

Extensions

Edited, corrected (3 inserted) and extended beyond a(16) by Klaus Brockhaus, Jan 05 2009
3 inserted and extended by R. J. Mathar, Jan 03 2009

A267144 Octagonal numbers with prime indices.

Original entry on oeis.org

8, 21, 65, 133, 341, 481, 833, 1045, 1541, 2465, 2821, 4033, 4961, 5461, 6533, 8321, 10325, 11041, 13333, 14981, 15841, 18565, 20501, 23585, 28033, 30401, 31621, 34133, 35425, 38081, 48133, 51221, 56033, 57685, 66305, 68101, 73633, 79381, 83333, 89441, 95765
Offset: 1

Views

Author

Ilya Gutkovskiy, Jan 11 2016

Keywords

Crossrefs

Programs

  • Magma
    [NthPrime(n)*(3*NthPrime(n)-2): n in [1..50]]; // Vincenzo Librandi, Jan 12 2016
    
  • Mathematica
    Table[Prime[n] (3 Prime[n] - 2), {n, 1, 45}]
  • PARI
    lista(nn) = forprime(p=2, nn, print1(p*(3*p-2), ", ")); \\ Altug Alkan, Jan 11 2016
    
  • Python
    from sympy import prime
    def a(n): p = prime(n); return p*(3*p-2)
    print([a(n) for n in range(1, 42)]) # Michael S. Branicky, Aug 21 2021

Formula

a(n) = prime(n)*(3*prime(n) - 2) = A000040(n)*(3*A000040(n) - 2).
a(n) = A000567(A000040(n)).
a(n) = sigma_0(24^(prime(n) - 1)) = A000005(A009968(A000040(n) - 1)).

A090780 a(n) = n*Product_{p prime, p|n} (p - 1)/2.

Original entry on oeis.org

1, 1, 3, 2, 10, 3, 21, 4, 9, 10, 55, 6, 78, 21, 30, 8, 136, 9, 171, 20, 63, 55, 253, 12, 50, 78, 27, 42, 406, 30, 465, 16, 165, 136, 210, 18, 666, 171, 234, 40, 820, 63, 903, 110, 90, 253, 1081, 24, 147, 50, 408, 156, 1378, 27, 550, 84, 513, 406, 1711, 60, 1830, 465, 189
Offset: 1

Views

Author

Benoit Cloitre, Feb 12 2004

Keywords

Comments

a(2n+1) is the conjectured value of the length of period of sequence of Genocchi number of first kind read modulo (2n + 1) (cf. A001469).

Crossrefs

Programs

  • Maple
    A023900 := proc(n) add( d*numtheory[mobius](d),d=numtheory[divisors](n)) ; end proc:
    A001221 := proc(n) nops(numtheory[factorset](n)) ; end proc:
    A076479 := proc(n) (-1)^A001221(n) ; end proc:
    A034444 := proc(n) 2^A001221(n) ;end proc:
    A090780 := proc(n) n/A076479(n)/A034444(n) *A023900(n); end proc:
    seq(A090780(n),n=1..20) ; # R. J. Mathar, Apr 14 2011
  • Mathematica
    a[n_] := Module[{f, p, e}, fun[p_, e_] := (p - 1)*p^e/2;
    If[n == 1, 1, Times @@ (fun @@@ FactorInteger[n])]]; Array[a, 50] (* Amiram Eldar, Nov 23 2018 *)
  • PARI
    a(n) = my(f=factor(n)[,1]); n*prod(k=1, #f, (f[k]-1)/2); \\ Michel Marcus, May 26 2019
    
  • PARI
    a(n) = eulerphi(n)*factorback(factorint(n)[, 1]/2) \\ Jianing Song, Aug 11 2023

Formula

a(n) = (n/(-2)^omega(n))*(Sum_{d|n} d*mu(d)) = n*A023900(n)/(A076479(n)*A034444(n)).
a(n) = n*A173557(n)/2. - R. J. Mathar, Apr 14 2011
From Jianing Song, Nov 22 2018: (Start)
Multiplicative with a(p^e) = (p - 1)*p^e/2 = A000217(p-1)*p^(e-1).
a(n) = A299822(n)/2^A001221(n).
a(prime(n)) = A034953(n).
a(n) is odd if and only if n = A004614(k) or 2*A004614(k). (End)
Sum_{k>=1} 1/a(k) = Product_{primes p} (1 + 2/(p-1)^2) = 5.72671092223951683002237367406848393189560038246828458038126468772919585... - Vaclav Kotesovec, Sep 20 2020
From Jianing Song, Aug 11 2023: (Start)
a(n) = phi(n) * Product_{p|n, p prime} (p/2), where phi = A000010.
Equals A000010(n)*A007947(n)/2^A001221(n). (End)

A116911 Prime partial sums of pentagonal numbers with prime indices.

Original entry on oeis.org

5, 17, 4957, 129277, 2826443, 3861083, 5126483, 9451573, 19811083, 53751743, 68136617, 98729003, 264616831, 388771421, 498157871, 608312141, 682548511, 779346653, 918754301, 1174179079, 1700023891, 2056298683, 2149703411
Offset: 1

Views

Author

Jonathan Vos Post, Apr 03 2006

Keywords

Comments

See also: A116994 Prime partial sums of triangular numbers with prime indices. A116995 Pentagonal numbers with prime indices.

Examples

			a(1) = Sum_{i=1..1} prime(i)*(3*prime(i)-1)/2 = P(2) = 5.
a(2) = Sum_{i=1..2} prime(i)*(3*prime(i)-1)/2 = P(2) + P(3) = 17.
a(3) = Sum_{i=1..11} prime(i)*(3*prime(i)-1)/2 = P(2) + P(3) + P(5) + P(7) + P(11) + P(13) + P(17) + P(19) + P(23) + P(29) + P(31) = 4957.
a(4) = P(2) + ... + P(103) = 129277.
		

Crossrefs

Programs

  • Maple
    P:=n->n*(3*n-1)/2: seq(P(n),n=0..10): a:=proc(n) if isprime(sum(P(ithprime(j)),j=1..n))=true then sum(P(ithprime(j)),j=1..n) else fi end: seq(a(n),n=1..600); # Emeric Deutsch, Apr 15 2006
  • Mathematica
    Module[{nn=4000,pn,pr},pn=PolygonalNumber[5,Range[nn]];pr=Table[If[ PrimeQ[ n],1,0],{n,nn}];Select[Accumulate[Pick[pn,pr,1]],PrimeQ]] (* Harvey P. Dale, Jan 27 2020 *)

Formula

A000040 INTERSECTION {Partial sums of A116995(n)}. (Sum_{i=1..k} A000326(A000040(i))) iff in A000040. (Sum_{i=1..k} prime(i)*(3*prime(i)-1)/2) iff in A000040.

Extensions

More terms from Emeric Deutsch, Apr 15 2006

A123907 a(n) = T(p(n)) - p(T(n)) = Commutator[triangular numbers, primes] at n.

Original entry on oeis.org

1, 1, 2, -1, 19, 18, 46, 39, 79, 178, 179, 306, 394, 375, 469, 662, 887, 872, 1127, 1265, 1248, 1553, 1703, 2018, 2600, 2780, 2763, 2987, 2958, 3134, 4587, 4849, 5380, 5373, 6518, 6503, 7100, 7725, 8089, 8750, 9431, 9452, 10859, 10892, 11260, 11219, 13275, 15485, 15947, 15908, 16358, 17257, 17222, 19189
Offset: 1

Views

Author

Jonathan Vos Post, Oct 28 2006

Keywords

Comments

Asymptotically p(T(n)) ~ (n^2 + n)*(log n) and T(p(n)) ~ (1/2)(n log n)^2, hence asymptotically a(n) ~ (1/2)(n log n)^2 - (n^2 + n)*(log n) = O((n^2)(log n)^2). a(4) = -1 should be the only negative value.

Examples

			a(1) = T(p(1)) - p(T(1)) = T(2) - p(1) = 3 - 2 = 1.
a(2) = T(p(2)) - p(T(2)) = T(2) - p(1) = 6 - 5 = 1.
a(3) = T(p(3)) - p(T(3)) = T(2) - p(1) = 15 - 13 = 1.
a(4) = T(p(4)) - p(T(4)) = T(2) - p(1) = 28 - 29 = -1.
a(5) = T(p(5)) - p(T(5)) = T(2) - p(1) = 66 - 47 = 19.
		

Crossrefs

Programs

  • Magma
    P:=NthPrime; B:=Binomial; [B(P(n)+1,2) - P(B(n+1,2)): n in [1..60]]; // G. C. Greubel, Aug 06 2019
    
  • Maple
    A000040 := proc(n) ithprime(n) ; end; A000217 := proc(n) n*(n+1)/2 ; end; A123907 := proc(n) A000217(A000040(n))-A000040(A000217(n)) ; end ; for n from 1 to 80 do printf("%d,",A123907(n)) ; end; # R. J. Mathar, Jan 13 2007
  • Mathematica
    With[{B=Binomial, P=Prime}, Table[B[P[n]+1, 2] -P[B[n+1, 2]], {n, 60}]] (* G. C. Greubel, Aug 06 2019 *)
  • PARI
    vector(60, n, p=prime; b=binomial; b(p(n)+1,2) - p(b(n+1,2)) ) \\ G. C. Greubel, Aug 06 2019
    
  • Sage
    p=nth_prime; b=binomial; [b(p(n)+1,2) - p(b(n+1,2)) for n in (1..60)] # G. C. Greubel, Aug 06 2019

Formula

a(n) = T(p(n)) - p(T(n)) where T(i) = i*(i+1)/2, p(i) = prime(i).
a(n) = A000217(A000040(n)) - A000040(A000217(n)).
a(n) = p(n)*(p(n)+1)/2 - p(n*(n+1)/2) where p(i) = prime(i).
a(n) = A034953(n) - A011756(n).

Extensions

More terms from R. J. Mathar, Jan 13 2007

A139117 Triangular numbers (A000217) with indices A000043.

Original entry on oeis.org

3, 6, 15, 28, 91, 153, 190, 496, 1891, 4005, 5778, 8128, 135981, 184528, 818560, 2427706, 2602621, 5176153, 9046131, 9783676, 46943205, 49416711, 62871291, 198751953, 235477551, 269340445, 990013753, 3718970646, 6105511756, 8718535225, 23347768186, 286403014380
Offset: 1

Views

Author

Omar E. Pol, May 08 2008

Keywords

Examples

			a(4) = 28 because A000043(4) = 7 and the 7th triangular number A000217(7) is 28.
		

Crossrefs

Programs

  • Mathematica
    Map[#*(#+1)/2 &, MersennePrimeExponent[Range[48]]] (* Amiram Eldar, Oct 21 2024 *)

Formula

a(n) = A000217(A000043(n)).

A144519 Triangular numbers n*(n+1)/2 with n prime and n+1 nonprime.

Original entry on oeis.org

6, 15, 28, 66, 91, 153, 190, 276, 435, 496, 703, 861, 946, 1128, 1431, 1770, 1891, 2278, 2556, 2701, 3160, 3486, 4005, 4753, 5151, 5356, 5778, 5995, 6441, 8128, 8646, 9453, 9730, 11175, 11476, 12403, 13366, 14028, 15051, 16110, 16471, 18336, 18721, 19503, 19900, 22366, 24976, 25878
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Dec 15 2008

Keywords

Comments

This is A034953 without the 3. [From R. J. Mathar, Feb 21 2009]

Examples

			If n=3(prime) and n=4(nonprime), then 3*4/2=6=a(1). If n=5(prime) and n=6(nonprime), then 5*6/2=15=a(2). If n=7(prime) and n=8(nonprime), then 7*8/2=28=a(3). If n=11(prime) and n=12(nonprime), then 11*12/2=66=a(4). If n=13(prime) and n=14(nonprime), then 13+14/2=91=a(5), etc.
		

Crossrefs

Programs

  • Mathematica
    Table[(p(p+1))/2,{p,Prime[Range[2,50]]}] (* Harvey P. Dale, Dec 28 2023 *)

Extensions

Corrected definition. Inserted 2701, extended beyond 11175. - R. J. Mathar, Dec 19 2008

A160973 a(n) is the number of positive integers of the form (n-3k)/(2k+1), 1 <= k <= (n-1)/5.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 2, 0, 1, 0, 0, 3, 0, 1, 1, 0, 2, 1, 0, 0, 3, 2, 0, 1, 0, 0, 3, 2, 0, 2, 0, 2, 1, 0, 2, 1, 2, 0, 3, 0, 0, 5, 0, 0, 1, 0, 2, 3, 2, 1, 1, 2, 0, 1, 0, 2, 5, 0, 0, 1, 2, 2, 3, 0, 0, 3, 2, 0, 1, 2, 0, 5, 0, 1, 3, 0, 4, 1, 0, 0, 1
Offset: 0

Views

Author

Vladimir Shevelev, Jun 01 2009, Jun 07 2009

Keywords

Comments

If n is different from 3, then a(n)=0 iff n is in A067076, i.e., 2n+3 is prime.

Crossrefs

Programs

  • Mathematica
    a[n_] := Length[Select[Range[Floor[(n-1)/5]], IntegerQ[(n-3#)/(2#+1)] &]]; Array[a, 100, 0] (* Amiram Eldar, Dec 15 2018 *)
  • PARI
    a(n) = sum(k=1, (n-1)/5, frac((n-3*k)/(2*k+1)) == 0); \\ Michel Marcus, Dec 15 2018

Extensions

Edited by N. J. A. Sloane, Jun 07 2009
a(44) corrected and more terms from Michel Marcus, Dec 15 2018
Previous Showing 31-40 of 52 results. Next