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

A248128 Start with a(0)=50, then a(n) = three times the n-th digit of the sequence, for all n > 0.

Original entry on oeis.org

50, 15, 0, 3, 15, 0, 9, 3, 15, 0, 27, 9, 3, 15, 0, 6, 21, 27, 9, 3, 15, 0, 18, 6, 3, 6, 21, 27, 9, 3, 15, 0, 3, 24, 18, 9, 18, 6, 3, 6, 21, 27, 9, 3, 15, 0, 9, 6, 12, 3, 24, 27, 3, 24, 18, 9, 18, 6, 3, 6, 21, 27, 9, 3, 15, 0, 27, 18, 3, 6, 9, 6, 12, 6, 21, 9, 6, 12, 3, 24
Offset: 0

Views

Author

Eric Angelini and M. F. Hasler, Oct 02 2014

Keywords

Comments

The terms in between 0's in the sequence converge "from right to left" to a limiting sequence ...,18,6,3,6,21,27,9,3,15,0. This sequence is listed in A248129. Sequence A248130 lists the individual digits, starting from some 0 and going to the left (until another 0 would be reached); they are equal to A248129/3.
It seems natural to use offset 0 to have the initial term equal to a(0) and a(n) directly related to the n-th digit of the sequence.
All terms a(n) with index n>0 are divisible by 3, the sequence a(n)/3 is nothing else than the individual digits of this sequence.

Examples

			a(0)=50 by definition, a(1) = 15 = 3*5 (= 3 x the 1st digit of "50"), a(2) = 0 = 3*0 (3 x the 2nd digit of "50,15"), a(3) = 3 = 3*1 (= 3 x the 3rd digit of the sequence which is the 1st digit of a(1) and equals 1).
		

Programs

  • PARI
    a(n,s=50,d=[])={for(i=1,n,print1(s",");d=concat(d,if(s,digits(s)));s=3*d[1];d=vecextract(d,"^1"));s}

A248131 Start with a(0) = 1, then a(n) = three times the n-th digit of the sequence.

Original entry on oeis.org

1, 3, 9, 27, 6, 21, 18, 6, 3, 3, 24, 18, 9, 9, 6, 12, 3, 24, 27, 27, 18, 3, 6, 9, 6, 12, 6, 21, 6, 21, 3, 24, 9, 18, 27, 18, 3, 6, 18, 6, 3, 18, 6, 3, 9, 6, 12, 27, 3, 24, 6, 21, 3, 24, 9, 18, 3, 24, 18, 9, 3, 24, 18, 9, 27, 18, 3, 6, 6, 21, 9, 6, 12, 18, 6, 3, 9, 6, 12, 27
Offset: 0

Views

Author

M. F. Hasler, Oct 02 2014

Keywords

Comments

A (more natural?) variant of A248128, using the same rule but the smallest nontrivial initial value a(0)=1 instead of 50. However, none of the digits 0 and 5 can appear in the sequence if they don't appear in a(0), which motivates A248128(0)=50. See A248153 for a variant using multiples of 7 instead of 3.
All terms a(n) with index n>0 are divisible by 3, the sequence a(n)/3 yields exactly the individual digits of this sequence.

Crossrefs

Programs

  • Haskell
    a248131 n = a248131_list !! n
    a248131_list = 1 : (map (* 3) $
                   concatMap (map (read . return) . show) a248131_list)
    -- Reinhard Zumkeller, Oct 02 2014
  • PARI
    a(n,s=1,d=[])={for(i=1,n,print1(s",");d=concat(d,if(s,digits(s)));s=3*d[1];d=vecextract(d,"^1"));s}
    

A248153 Start with a(0)=10, then a(n) = 7 times the n-th digit of the sequence.

Original entry on oeis.org

10, 7, 0, 49, 0, 28, 63, 0, 14, 56, 42, 21, 0, 7, 28, 35, 42, 28, 14, 14, 7, 0, 49, 14, 56, 21, 35, 28, 14, 14, 56, 7, 28, 7, 28, 49, 0, 28, 63, 7, 28, 35, 42, 14, 7, 21, 35, 14, 56, 7, 28, 7, 28, 35, 42, 49, 14, 56, 49, 14, 56, 28, 63, 0, 14, 56, 42, 21, 49, 14, 56, 21, 35
Offset: 0

Views

Author

M. F. Hasler, Oct 02 2014

Keywords

Comments

This sequence was inspired by E. Angelini's post to the SeqFan list, cf. links.
a(0)=10 is the smallest possible choice to ensure that the digit 0 appears anywhere in the sequence. a(0)=1 would lead to the same sequence with the terms 0 removed.
By construction, all terms a(n), n>0, are divisible by 7, and a(n)/7 yields the sequence of digits of the (concatenated) terms of this sequence.
It is easy to show that the distance between two 0's is strictly increasing from one occurrence to the next one. Thus, the asymptotic density of terms and/or digits 0 is zero, and the sequence can never "enter a loop".

Crossrefs

Programs

  • PARI
    a(n,s=10,m=7,d=[])={for(i=1,n,print1(s",");d=concat(d,if(s,digits(s)));s=m*d[1];d=vecextract(d,"^1"));s}
    
  • Python
    def aupton(nn):
        alst, astr = [10], "X10"
        for n in range(1, nn+1):
            alst.append(7 * int(astr[n]))
            astr += str(alst[-1])
        return alst
    print(aupton(72)) # Michael S. Branicky, Oct 07 2021
Showing 1-3 of 3 results.