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

A243658 a(0)=0; thereafter a(n) = noz(n+a(n-1)), where noz(n) = A004719(n).

Original entry on oeis.org

0, 1, 3, 6, 1, 6, 12, 19, 27, 36, 46, 57, 69, 82, 96, 111, 127, 144, 162, 181, 21, 42, 64, 87, 111, 136, 162, 189, 217, 246, 276, 37, 69, 12, 46, 81, 117, 154, 192, 231, 271, 312, 354, 397, 441, 486, 532, 579, 627, 676, 726, 777, 829, 882, 936, 991, 147, 24, 82, 141, 21, 82, 144, 27, 91, 156, 222, 289
Offset: 0

Views

Author

N. J. A. Sloane, Jun 11 2014

Keywords

Comments

Zeroless analog of triangular numbers.

Crossrefs

Row n = 3 of A373169.

Programs

  • Maple
    noz:=proc(n) local a,t1,i,j; a:=0; t1:=convert(n,base,10); for i from 1 to nops(t1) do j:=t1[nops(t1)+1-i]; if j <> 0 then a := 10*a+j; fi; od: a; end;
    t1:=[0]; for n from 1 to 50 do t1:=[op(t1),noz(n+t1[n])]; od: t1;
  • Mathematica
    noz[n_] := FromDigits[DeleteCases[IntegerDigits[n], 0]];
    Block[{n = 0}, NestList[noz[++n+#] &, 0, 100]] (* Paolo Xausa, Apr 17 2024 *)
  • Python
    from itertools import count, islice
    def noz(n): return int(str(n).replace("0", ""))
    def agen(): # generator of terms
        yield (an:=0)
        yield from (an:=noz(n+an) for n in count(1))
    print(list(islice(agen(), 68))) # Michael S. Branicky, Jul 02 2024

A242350 Multiply a(n-1) by 2 and drop all 0's.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 124, 248, 496, 992, 1984, 3968, 7936, 15872, 31744, 63488, 126976, 253952, 5794, 11588, 23176, 46352, 9274, 18548, 3796, 7592, 15184, 3368, 6736, 13472, 26944, 53888, 17776, 35552, 7114, 14228, 28456, 56912, 113824
Offset: 1

Views

Author

J. Lowell, May 11 2014

Keywords

Comments

Sequence enters a loop having period 36 at index 491: a(491) = a(527) = 366784, min and max being 28714 and 11772544. Starting with 3 instead of 1 gives another cycle. - Tom Edgar and Michel Marcus, May 13 2014
Zeroless analog of powers of 2. - N. J. A. Sloane, Jun 11 2014

Examples

			Term after 512 is 124 because 512*2=1024, and 1024 becomes 124 if all 0's are taken out.
		

Crossrefs

Programs

  • Mathematica
    NestList[FromDigits[Select[IntegerDigits[2 #],#!=0&]]&,1,50] (* Harvey P. Dale, Oct 22 2018 *)
  • PARI
    dropz(n)=d = digits(n); s = 0; for (i=1, #d, if (d[i], s = 10*s + d[i]);); s;
    lista(nn) = a = 1; for (i=1, nn, print1(a, ", "); a = dropz(2*a);) \\ Michel Marcus, May 12 2014

Extensions

More terms from Michel Marcus, May 12 2014

A243657 Zeroless factorials: a(0)=1; thereafter a(n) = noz(n*a(n-1)), where noz(n) = A004719(n) omits the zeros from n.

Original entry on oeis.org

1, 1, 2, 6, 24, 12, 72, 54, 432, 3888, 3888, 42768, 513216, 667188, 934632, 141948, 2271168, 3869856, 6965748, 132349212, 264698424, 555866694, 1222967268, 28128247164, 67577931936, 16894482984, 439256557584, 1185992754768, 332779713354, 965611687266, 289683561798, 89819415738
Offset: 0

Views

Author

N. J. A. Sloane, Jun 11 2014

Keywords

Comments

Zeroless analog of factorial numbers.
A very crude calculation suggests a(n) may grow like n^10. I don't really believe that, but certainly a(n) grows very slowly in comparison with n!. - N. J. A. Sloane, Sep 03 2014

Crossrefs

Programs

  • Maple
    noz:=proc(n) local a,t1,i,j; a:=0; t1:=convert(n,base,10); for i from 1 to nops(t1) do j:=t1[nops(t1)+1-i]; if j <> 0 then a := 10*a+j; fi; od: a; end;
    t1:=[1]; for n from 1 to 50 do t1:=[op(t1),noz(n*t1[n])]; od: t1;
  • Mathematica
    nxt[{n_,a_}]:={n+1,FromDigits[DeleteCases[IntegerDigits[a(n+1)],0]]}; NestList[nxt,{0,1},40][[;;,2]] (* Harvey P. Dale, Feb 13 2024 *)
  • Python
    from itertools import count, islice
    def noz(n): return int(str(n).replace("0", ""))
    def agen(): # generator of terms
        yield (an:=1)
        yield from (an:=noz(n*an) for n in count(1))
    print(list(islice(agen(), 32))) # Michael S. Branicky, Jul 02 2024

A306773 Triangle read by rows, 0 <= k < n, n >= 2: T(n,k) is the eventual period of the modified Fibonacci sequence x(j) (or 0 if x(j) never enters a cycle) defined as follows: x(0) = 0, x(1) = 1, and for j > 1 x(j) is obtained from x(j-1) + x(j-2) by deleting all occurrences of the digit k in base n.

Original entry on oeis.org

1, 1, 3, 1, 3, 16, 1, 3, 24, 6, 1, 3, 13, 6, 100, 1, 3, 8, 252, 120, 24, 1, 3, 8, 42, 119, 96, 576, 1, 3, 60, 588, 378, 36, 624, 1932, 1, 3, 126, 600, 144, 381, 200, 936, 912, 1, 3, 480, 51, 9, 2760, 6220, 540, 1800, 5700, 1, 3, 170, 750, 2480, 14880, 10990, 300, 1440, 3660, 840, 1, 3, 13800, 5880, 432, 48096, 60528, 456, 17640, 8496, 10560
Offset: 2

Views

Author

Pontus von Brömssen, Mar 09 2019

Keywords

Comments

For k = 1 x(j) = 0 for all j > 1, so T(n,1) = 1 for n >= 2.
For k = 2 x(j) is the periodic sequence 0, 1, 1, 0, 1, 1, ... (A011655), so T(n,2) = 3 for n >= 3.

Examples

			Triangle begins:
   n\k    0     1     2     3     4     5     6     7     8     9    10    11
  ---------------------------------------------------------------------------
   2:     1     1
   3:     3     1     3
   4:    16     1     3    24
   5:     6     1     3    13     6
   6:   100     1     3     8   252   120
   7:    24     1     3     8    42   119    96
   8:   576     1     3    60   588   378    36   624
   9:  1932     1     3   126   600   144   381   200   936
  10:   912     1     3   480    51     9  2760  6220   540  1800
  11:  5700     1     3   170   750  2480 14880 10990   300  1440  3660
  12:   840     1     3 13800  5880   432 48096 60528   456 17640  8496 10560
T(10,0) = 912 because A243063 eventually enters a cycle of length 912.
		

Crossrefs

Programs

  • PARI
    isok(v) = {for (n=1, #v-2, if ((v[#v] == v[#v - n]) && (v[#v-1] == v[#v - n - 1]), return (n));); 0;}
    f(x, y, n, k) = {my(z=x+y, d = digits(z, n)); fromdigits(select(t->(t!=k), d), n);}
    T(n,k) = {my(v = [0, 1], len = 2); while (! (per = isok(v)), v = concat(v, f(v[len-1], v[len], n, k)); len++;); per;} \\ Michel Marcus, May 01 2019
    
  • Python
    # Note: the function hangs if the sequence never enters a cycle.
    import functools,sympy
    def drop(x,n,k): return functools.reduce(lambda x,j:n*x+j if j!=k else x,sympy.ntheory.factor_.digits(x,n)[1:],0) # Drop all digits k from x in base n.
    def A306773(n,k): return next(sympy.cycle_length(lambda x:(x[1],drop(x[0]+x[1],n,k)),(0,1)))[0]
    # Pontus von Brömssen, May 09 2019

A371911 Zeroless analog of tribonacci numbers.

Original entry on oeis.org

1, 1, 1, 3, 5, 9, 17, 31, 57, 15, 13, 85, 113, 211, 49, 373, 633, 155, 1161, 1949, 3265, 6375, 11589, 21229, 39193, 7211, 67633, 11437, 86281, 165351, 26369, 2781, 19451, 4861, 2793, 2715, 1369, 6877, 1961, 127, 8965, 1153, 1245, 11363, 13761, 26369, 51493, 91623, 169485, 31261
Offset: 0

Views

Author

Bryle Morga, Apr 11 2024

Keywords

Comments

At n = 208666297 this sequence enters a cycle that has a period of 300056874 and begins: 2847, 26331, 5851, ... (only the first 3 terms of the cycle are needed to reproduce the entire cycle).
This can be compared with the sequence A243063, which enters a cycle that has a (relatively) small period of 912.

Examples

			a(9) = Zr(a(8) + a(7) + a(6)) = Zr(17 + 31 + 57) = Zr(105) = 15.
		

Crossrefs

Programs

  • Mathematica
    a[0]=a[1]=a[2]=1; a[n_]:=FromDigits[DeleteCases[IntegerDigits[a[n-1]+a[n-2]+a[n-3]],0]]; Array[a,50,0] (* Stefano Spezia, Apr 12 2024 *)
  • Python
    def a(n):
        a, b, c = 1, 1, 1
        for _ in range(n):
            a, b, c = b, c, int(str(a+b+c).replace('0', ''))
        return a
    
  • Python
    # faster for initial segment of sequence
    from itertools import islice
    def agen(): # generator of terms
        a, b, c = 1, 1, 1
        while True: yield a; a, b, c = b, c, int(str(a+b+c).replace("0", ""))
    print(list(islice(agen(), 50))) # Michael S. Branicky, Apr 13 2024

Formula

a(n) = Zr(a(n-1) + a(n-2) + a(n-3)), where the function Zr(k) removes all zero digits from k.

A374265 Minimized zeroless factorials.

Original entry on oeis.org

1, 1, 2, 6, 24, 12, 72, 54, 432, 3888, 3888, 42768, 47916, 62298, 872172, 13968, 221688, 57996, 143928, 134712, 269154, 563994, 1247868, 286344, 877356, 171864, 513324, 1252728, 3414474, 914616, 41868, 119178, 454716, 127188, 527832, 15642, 91332, 192924, 125892, 29718
Offset: 0

Views

Author

Bryle Morga, Jul 02 2024

Keywords

Comments

a(n) is the smallest f(n) such that f(0) = 1 and for i > 0, f(i) = OpNoz_i(i*f(i-1)),where OpNoz_i is a function that either removes zeros or keeps the value unchanged (the choice is made for each value of i).
Removing zeros at every i gives an upper bound a(n) <= A243657(n); is this a strict inequality for n >= 12?
Is this sequence bounded?

Examples

			a(12) = 47916 via the path: 1, 1, 2, 6, 24, 12, 72, 504, 4032, 36288, 362880, 3991680, 47916.
		

Crossrefs

Programs

  • Python
    def a(n):
       reach = {1}
       for i in range(1, n+1):
          newreach = set()
          for m in reach:
             newreach.update([m*i, int(str(m*i).replace('0', ''))])
          reach = newreach
       return min(reach)

A374266 Smallest number reachable by a Fibonacci-like iteration where one has the option to either omit or keep zero digits.

Original entry on oeis.org

1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 61, 438, 499, 937, 1436, 2373, 389, 2762, 1657, 1368, 325, 1693, 218, 1911, 2129, 44, 1516, 129, 394, 37, 53, 9, 62, 35, 133, 24, 121, 181, 95, 69, 11, 53, 19, 9, 19, 19, 2, 12, 5, 8, 4, 3, 7, 1, 8, 9, 8, 8, 7, 6, 4
Offset: 1

Views

Author

Bryle Morga, Jul 02 2024

Keywords

Comments

a(n) is the smallest f(n) such that f(1)=f(2)=1 and f(i) = OpNoz_i(f(i-1)+f(i-2)) for 2
Choosing to always remove zero digits at each step gives A243063. This strategy of always choosing to remove zeros is optimal for n < 23. For n >= 23, a(n) < A243063(n), i.e., the optimal path contains a step that keeps zeros.
Removal of zeros preserves the digital root giving the lower bound a(n) >= A030132(n). In fact, for n >= 53, a(n) = A030132(n). It follows that this sequence is eventually periodic with a period of 24.

Examples

			a(23) = 1657 via the path: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 1946, 8711, 1657.
		

Programs

  • Python
    def a(n):
        reach = {(1, 1)}
        for _ in range(n-1):
            newreach = set()
            for a, b in reach:
                newreach.update([(b, a+b), (b, int(str(a+b).replace('0', '')))])
            reach = newreach
        return min(reach, key = lambda k:k[0])[0]

Formula

a(n) <= A243063(n); Strict inequality for n >= 23.
a(n) = A030132(n) and a(n) = a(n+24) for n >= 53.

A371916 Zeroless analog of tetranacci numbers.

Original entry on oeis.org

1, 1, 1, 1, 4, 7, 13, 25, 49, 94, 181, 349, 673, 1297, 25, 2344, 4339, 85, 6793, 13561, 24778, 45217, 9349, 9295, 88639, 1525, 1888, 11347, 13399, 28159, 54793, 17698, 11449, 11299, 95239, 135685, 253672, 495895, 98491, 983743, 183181, 176131, 1441546, 278461, 279319, 2175457
Offset: 0

Author

Bryle Morga, Apr 12 2024

Keywords

Comments

It is not known whether this sequence cycles, but it is conjectured to cycle just like A243063 and A371911 (have periods of 912 and 300056874, respectively) because the expected growth factor in the number of digits of successive terms is 0.9.
It's been computationally verified that if the sequence does cycle, then s+p > 10^10, where s and p are the starting index and period of the cycle, respectively.

Examples

			a(14) = Zr(a(13)+a(12)+a(11)+a(10)) = Zr(1297+673+349+181) = Zr(2500) = 25.
		

Programs

  • Mathematica
    a[0]=a[1]=a[2]=a[3]=1; a[n_]:=FromDigits[DeleteCases[IntegerDigits[a[n-1]+a[n-2]+a[n-3]+a[n-4]], 0]]; Array[a, 46, 0] (* Stefano Spezia, Apr 12 2024 *)
  • Python
    def a(n):
        a, b, c, d = 1, 1, 1, 1
        for _ in range(n):
            a, b, c, d = b, c, d, int(str(a+b+c+d).replace('0', ''))
        return a
    
  • Python
    # faster for initial segment of sequence
    from itertools import islice
    def agen(): # generator of terms
        a, b, c, d = 1, 1, 1, 1
        while True:
            yield a
            a, b, c, d = b, c, d, int(str(a+b+c+d).replace("0", ""))
    print(list(islice(agen(), 45))) # Michael S. Branicky, Apr 13 2024

Formula

a(n) = Zr(a(n-1)+a(n-2)+a(n-3)+a(n-4)), where the function Zr(k) removes zero digits from k.
Showing 1-8 of 8 results.