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.

Showing 1-2 of 2 results.

A287353 a(0)=0; for n>0, a(n) = 10*a(n-1) + prime(n).

Original entry on oeis.org

0, 2, 23, 235, 2357, 23581, 235823, 2358247, 23582489, 235824913, 2358249159, 23582491621, 235824916247, 2358249162511, 23582491625153, 235824916251577, 2358249162515823, 23582491625158289
Offset: 0

Views

Author

Luke Zieroth, May 23 2017

Keywords

Crossrefs

Cf. A379426 (prime terms).

Programs

  • Mathematica
    FoldList[10 #1 + Prime@ #2 &, 0, Range@ 17] (* Michael De Vlieger, May 24 2017 *)
  • PARI
    a(n) = fromdigits(primes(n)); \\ Kevin Ryde, Jun 22 2022
  • Python
    from sympy import prime
    l = [0]
    for i in range(20):
        l += [10 * l[i] + prime(i + 1)]
    print(l) # Indranil Ghosh, May 25 2017
    

Formula

a(n) = Sum_{i=1..n} 10^(n-i)*prime(i), n >= 1. - Ya-Ping Lu, Dec 24 2024

A135483 a(n) = Sum_{j=1..n} prime(j)*2^(j-2).

Original entry on oeis.org

1, 4, 14, 42, 130, 338, 882, 2098, 5042, 12466, 28338, 66226, 150194, 326322, 711346, 1579698, 3513010, 7510706, 16292530, 34904754, 73177778, 156015282, 330078898, 703371954, 1517066930, 3211565746, 6667672242, 13848320690, 28478053042, 58811259570
Offset: 1

Views

Author

Ctibor O. Zizka, Feb 07 2008

Keywords

Crossrefs

Partial sums of A239885.

Programs

  • Mathematica
    Table[Sum[2^(i-2) * Prime[i], {i, 1, n}], {n, 1, 10}] (* G. C. Greubel, Oct 15 2016 *)
    Accumulate[Table[Prime[i]*2^(i-2),{i,30}]] (* Harvey P. Dale, Aug 14 2019 *)
  • PARI
    a(n) = sum(k=1, n, prime(k)*2^(k-2)); \\ Michel Marcus, Oct 15 2016
Showing 1-2 of 2 results.