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.

User: Luca Pezzullo

Luca Pezzullo's wiki page.

Luca Pezzullo has authored 2 sequences.

A274140 Sum of primes dividing n-th triangular number, counted with multiplicity.

Original entry on oeis.org

0, 3, 5, 7, 8, 10, 11, 10, 11, 16, 16, 18, 20, 15, 14, 23, 23, 25, 26, 17, 21, 34, 30, 17, 23, 22, 18, 38, 37, 39, 39, 22, 31, 29, 20, 45, 56, 35, 25, 50, 51, 53, 56, 24, 34, 70, 56, 23, 24, 30, 35, 68, 62, 25, 27, 33, 51, 88, 69, 71, 92, 44, 23, 28, 32, 81, 86, 45, 38, 83, 81, 83, 110, 50, 34, 39, 34, 95, 90
Offset: 1

Author

Luca Pezzullo, Jun 11 2016

Keywords

Examples

			a(4) = 7; the 4th triangular number is 10, the prime factors of 10 are 2 and 5, and 2+5 = 7.
a(6) = 10; the 6th triangular number is 21, the prime factors of 21 are 3 and 7, and 3+7 = 10.
		

Crossrefs

Cf. A000217 (triangular numbers), A001414 (sum of primes dividing n).

Programs

  • Mathematica
    a[1]=0; a[n_] := Plus @@ Times @@@ FactorInteger[n (n+1)/2]; Array[a, 80] (* Giovanni Resta, Jun 12 2016 *)
    Join[{0},Rest[Total[Times@@@FactorInteger[#]]&/@Accumulate[Range[100]]]] (* Harvey P. Dale, May 06 2024 *)
  • PARI
    a(n) = my(f=factor(n*(n+1)/2));sum(i=1,matsize(f)[1],f[i,1]*f[i,2]) \\ David A. Corneth, Jun 12 2016

Formula

For any integer coefficient C(n) of the polynomial generated by the Triangular Numbers generating function f(x)=x/((1-x)^3), if C(n) = Product (p_j^k_j) then a(n) = Sum (p_j * k_j).
a(n) = A001414(A000217(n)).

Extensions

a(30) and a(38) corrected by Giovanni Resta, Jun 12 2016

A227346 Distance between consecutive pairs of primes differing by 6 (p, p+6).

Original entry on oeis.org

2, 4, 2, 4, 6, 8, 6, 4, 6, 6, 8, 6, 6, 10, 14, 4, 2, 4, 24, 20, 6, 10, 6, 18, 2, 30, 4, 6, 18, 6, 6, 8, 6, 30, 4, 20, 16, 6, 14, 6, 10, 50, 10, 14, 4, 42, 38, 16, 6, 8, 16, 6, 8, 6, 6, 28, 6, 6, 24, 50, 6, 18, 70, 2, 30, 4, 20, 4, 60, 6, 24, 6, 14, 22, 20, 30
Offset: 1

Author

Luca Pezzullo, Jul 08 2013

Keywords

Crossrefs

Cf. A023201 (n and n+6 are primes).
Cf. A053320 (differences for Cousin primes).

Programs

  • Maple
    with(numtheory): pre:=0: for n from 1 to 3000 do if isprime(n) and isprime(n+6) then if pre<>0 then printf("%d, ", n-pre) fi: pre:=n fi od: # adapted from original program by C. Ronaldo for A053320
  • Mathematica
    Differences[Select[Prime[Range[200]], PrimeQ[# + 6] &]] (* T. D. Noe, Jul 09 2013 *)

Formula

a(n) = A023201(n+1) - A023201(n). - Zak Seidov, Sep 20 2013