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.

A168472 Partial sums of products of two distinct primes (A006881).

Original entry on oeis.org

6, 16, 30, 45, 66, 88, 114, 147, 181, 216, 254, 293, 339, 390, 445, 502, 560, 622, 687, 756, 830, 907, 989, 1074, 1160, 1247, 1338, 1431, 1525, 1620, 1726, 1837, 1952, 2070, 2189, 2311, 2434, 2563, 2696, 2830, 2971, 3113, 3256, 3401, 3547, 3702, 3860, 4019
Offset: 1

Views

Author

Keywords

Programs

  • Maple
    N:= 1001: # to get all a(n) where A006881(n) < N
    Primes:= select(isprime, [2, seq(2*k+1, k=1..floor(N/2))]):
    L:= sort(convert({seq(seq(p*q, q=Primes[1..ListTools:-BinaryPlace(Primes, N/p)]), p=Primes)} minus {seq(p^2, p=Primes)},list)):
    ListTools:-PartialSums(L); # Robert Israel, Apr 29 2018
  • Mathematica
    f[n_]:=Last/@FactorInteger[n]=={1,1}; s=0;lst={};Do[If[f[n],AppendTo[lst,s+=n]],{n,6!}];lst
    With[{nn=50},Take[Accumulate[Union[Times@@@Subsets[Prime[Range[nn]],{2}]]],nn]] (* Harvey P. Dale, Aug 08 2013 *)