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-1 of 1 results.

A305377 Tribonacci representation of primes, written in base 10.

Original entry on oeis.org

2, 3, 5, 8, 12, 16, 20, 22, 27, 37, 40, 48, 52, 54, 67, 74, 82, 84, 91, 99, 101, 108, 130, 137, 147, 152, 154, 162, 164, 169, 194, 198, 205, 209, 256, 258, 265, 273, 277, 288, 294, 297, 309, 320, 324, 326, 341, 358, 363, 365, 387, 394, 396, 409, 419, 426, 434, 436, 515, 520, 522, 534, 554, 560
Offset: 1

Views

Author

N. J. A. Sloane, Jun 12 2018

Keywords

Crossrefs

Equals A003726(prime(n)).

Programs

  • Maple
    L[0]:= [0]: L[1]:= [1]:
    for d from 2 to 15 do
      L[d]:= map(t -> (2*t, `if`(t mod 4 <> 3, 2*t+1,NULL)), L[d-1])
    od:
    A003726:=map(op,[seq(L[i],i=0..15)]):
    seq(A003726[ithprime(i)+1],i=1..numtheory:-pi(nops(A003726)-1)); # Robert Israel, Jun 12 2018
  • Python
    from sympy import prime
    def A305377(n):
        m, tlist, s = prime(n), [1,2,4], 0
        while tlist[-1]+tlist[-2]+tlist[-3] <= m:
            tlist.append(tlist[-1]+tlist[-2]+tlist[-3])
        for d in tlist[::-1]:
            s *= 2
            if d <= m:
                s += 1
                m -= d
        return s # Chai Wah Wu, Jun 12 2018

Extensions

More terms from Robert Israel, Jun 12 2018
Showing 1-1 of 1 results.