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-10 of 12 results. Next

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

A243063 Numbers generated by a Fibonacci-like sequence in which zeros are suppressed.

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, 3151, 5913, 964, 6877, 7841, 14718, 22559, 37277, 59836, 97113, 156949, 25462, 182411, 27873, 21284, 49157, 7441, 56598, 6439, 6337, 12776, 19113, 31889, 512, 3241
Offset: 1

Views

Author

Anthony Sand, Jun 09 2014

Keywords

Comments

Let x(1) = 1, x(2) = 1, then begin the sequence x(i) = no-zero(x(i-2) + x(i-1)), where the function no-zero(n) removes all zero digits from n.
The sequence behaves like a standard Fibonacci sequence until step 15, where x = no-zero(233 + 377) = no-zero(610) = 61. At step 16, x = 377 + 61 = 438. The sequence then proceeds until step 927, where x = no-zero(224 + 377) = no-zero(601) = 61. Therefore at step 928, x = 377 + 61 = 438 and the sequence repeats.

Examples

			x(3) = x(1) + x(2) = 1 + 1 = 2.
x(4) = x(2) + x(3) = 1 + 2 = 3.
x(15) = no-zero(x(13) + x(14)) = no-zero(233 + 377) = no-zero(610) = 61.
x(16) = 377 + 61 = 438.
		

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; # A004719
    t1:=[1,1]; for n from 3 to 100 do t1:=[op(t1),noz(t1[n-1]+t1[n-2])]; od: t1; # N. J. A. Sloane, Jun 11 2014
  • Mathematica
    Nest[Append[#, FromDigits@ DeleteCases[IntegerDigits[Total@ #[[-2 ;; -1]] ], ?(# == 0 &)]] &, {1, 1}, 45] (* _Michael De Vlieger, Jun 27 2020 *)
    nxt[{a_,b_}]:={b,FromDigits[DeleteCases[IntegerDigits[a+b],0]]}; NestList[nxt,{1,1},50][[All,1]] (* Harvey P. Dale, Sep 12 2022 *)

Formula

x(i) = no-zero(x(i-2) + x(i-1)). For example, no-zero(233 + 377) = no-zero(610) = 61.

A373169 Square array read by ascending antidiagonals: T(n,k) = noz(T(n,k-1) + (k-1)*(n-2) + 1), with T(n,1) = 1, n >= 2, k >= 1, where noz(n) = A004719(n).

Original entry on oeis.org

1, 1, 2, 1, 3, 3, 1, 4, 6, 4, 1, 5, 9, 1, 5, 1, 6, 12, 16, 6, 6, 1, 7, 15, 22, 25, 12, 7, 1, 8, 18, 28, 35, 36, 19, 8, 1, 9, 21, 34, 45, 51, 49, 27, 9, 1, 1, 24, 4, 55, 66, 7, 64, 36, 1, 1, 11, 18, 46, 29, 81, 91, 29, 81, 46, 2, 1, 12, 3, 43, 75, 6, 112, 12, 54, 1, 57, 3
Offset: 2

Views

Author

Paolo Xausa, May 27 2024

Keywords

Comments

Row n is the zeroless analog of the positive n-gonal numbers.

Examples

			The array begins:
  n\k|  1  2   3   4   5    6    7    8    9   10  ...
  ----------------------------------------------------
   2 |  1, 2,  3,  4,  5,   6,   7,   8,   9,   1, ... = A177274
   3 |  1, 3,  6,  1,  6,  12,  19,  27,  36,  46, ... = A243658 (from n = 1)
   4 |  1, 4,  9, 16, 25,  36,  49,  64,  81,   1, ... = A370812
   5 |  1, 5, 12, 22, 35,  51,   7,  29,  54,  82, ... = A373171
   6 |  1, 6, 15, 28, 45,  66,  91,  12,  45,  82, ... = A373172
   7 |  1, 7, 18, 34, 55,  81, 112, 148, 189, 235, ...
   8 |  1, 8, 21,  4, 29,   6,  43,  86, 135,  19, ...
   9 |  1, 9, 24, 46, 75, 111, 154,  24,  81, 145, ...
  10 |  1, 1, 18, 43, 76, 117, 166, 223, 288, 361, ...
  ...      |                                     \______ A373170 (main diagonal)
        A004719 (from n = 2)
		

Crossrefs

Cf. rows 2..6: A177274, A243658, A370812, A373171, A373172.
Cf. A373170 (main diagonal).

Programs

  • Mathematica
    noz[n_] := FromDigits[DeleteCases[IntegerDigits[n], 0]];
    A373169[n_, k_] := A373169[n, k] = If[k == 1, 1, noz[A373169[n, k-1] + (k-1)*(n-2) + 1]];
    Table[A373169[n - k + 1, k], {n, 2, 15}, {k, n - 1}]
  • PARI
    noz(n) = fromdigits(select(sign, digits(n)));
    T(n,k) = if (k==1, 1, noz(T(n,k-1) + (k-1)*(n-2) + 1));
    matrix(7,7,n,k,T(n+1,k)) \\ Michel Marcus, May 30 2024

A370812 a(1) = 1; for n >= 2, a(n) = noz(a(n-1) + 2*n - 1), where noz(n) = A004719(n).

Original entry on oeis.org

1, 4, 9, 16, 25, 36, 49, 64, 81, 1, 22, 45, 7, 34, 63, 94, 127, 162, 199, 238, 279, 322, 367, 414, 463, 514, 567, 622, 679, 738, 799, 862, 927, 994, 163, 234, 37, 112, 189, 268, 349, 432, 517, 64, 153, 244, 337, 432, 529, 628, 729, 832, 937, 144, 253, 364, 477
Offset: 1

Views

Author

Paolo Xausa, May 24 2024

Keywords

Comments

Zeroless analog of the positive squares.

Crossrefs

Programs

  • Mathematica
    noz[n_] := FromDigits[DeleteCases[IntegerDigits[n], 0]];
    Block[{n = 1}, NestList[noz[++n*2 - 1 + #] &, 1, 100]]

A373171 a(1) = 1; for n >= 2, a(n) = noz(a(n-1) + 3*n - 2), where noz(n) = A004719(n).

Original entry on oeis.org

1, 5, 12, 22, 35, 51, 7, 29, 54, 82, 113, 147, 184, 224, 267, 313, 362, 414, 469, 527, 588, 652, 719, 789, 862, 938, 117, 199, 284, 372, 463, 557, 654, 754, 857, 963, 172, 284, 399, 517, 638, 762, 889, 119, 252, 388, 527, 669, 814, 962, 1113, 1267, 1424, 1584
Offset: 1

Views

Author

Paolo Xausa, May 28 2024

Keywords

Comments

Zeroless analog of the positive pentagonal numbers.

Crossrefs

Row n = 5 of A373169.

Programs

  • Mathematica
    noz[n_] := FromDigits[DeleteCases[IntegerDigits[n], 0]];
    Block[{n = 1}, NestList[noz[++n*3 - 2 + #] &, 1, 100]]
  • PARI
    noz(n) = fromdigits(select(sign, digits(n))); \\ A004719
    lista(nn) = my(va=vector(nn)); for (n=1, nn, va[n] = if (n==1, 1, noz(va[n-1] + 3*n - 2))); va; \\ Michel Marcus, Jun 03 2024

A373172 a(1) = 1; for n >= 2, a(n) = noz(a(n-1) + 4*n - 3), where noz(n) = A004719(n).

Original entry on oeis.org

1, 6, 15, 28, 45, 66, 91, 12, 45, 82, 123, 168, 217, 27, 84, 145, 21, 9, 82, 159, 24, 19, 18, 111, 28, 129, 234, 343, 456, 573, 694, 819, 948, 181, 318, 459, 64, 213, 366, 523, 684, 849, 118, 291, 468, 649, 834, 123, 316, 513, 714, 919, 1128, 1341, 1558, 1779
Offset: 1

Views

Author

Paolo Xausa, May 28 2024

Keywords

Comments

Zeroless analog of the positive hexagonal numbers.

Crossrefs

Row n = 6 of A373169.

Programs

  • Mathematica
    noz[n_] := FromDigits[DeleteCases[IntegerDigits[n], 0]];
    Block[{n = 1}, NestList[noz[++n*4 - 3 + #] &, 1, 100]]
    nxt[{n_,a_}]:={n+1,FromDigits[DeleteCases[IntegerDigits[a+4n+1],0]]}; NestList[nxt,{1,1},60][[;;,2]] (* Harvey P. Dale, Jul 08 2024 *)
  • PARI
    noz(n) = fromdigits(select(sign, digits(n))); \\ A004719
    lista(nn) = my(va=vector(nn)); for (n=1, nn, va[n] = if (n==1, 1, noz(va[n-1] + 4*n - 3))); va; \\ Michel Marcus, Jun 03 2024

A321480 Zeroless analog of triangular numbers (version 2): a(0) = 0, and for any n > 0, a(n) = noz(1 + noz(2 + ... + noz((n-1) + n))), where noz(n) = A004719(n) omits the zeros from n.

Original entry on oeis.org

0, 1, 3, 6, 1, 15, 3, 28, 9, 18, 19, 39, 6, 28, 15, 12, 1, 9, 99, 37, 39, 177, 64, 69, 39, 19, 72, 99, 37, 12, 69, 64, 87, 12, 289, 27, 54, 82, 39, 42, 19, 6, 57, 37, 27, 54, 82, 12, 69, 64, 69, 12, 64, 27, 27, 82, 12, 87, 289, 69, 39, 289, 72, 99, 64, 57, 24
Offset: 0

Views

Author

Rémy Sigrist, Nov 11 2018

Keywords

Comments

This sequence is a variant of A243658 where the additions are carried in the opposite order; as (i, j) -> noz(i + j) is not associative in general we obtain another sequence.
This sequence is conjectured to be bounded. This could be explained by the fact that the zeros appearing in the last steps of the calculation (when adding small values) erode the number of digits of the intermediate sums.
The distinct values among the first 1000000 terms are: 0, 1, 3, 6, 9, 12, 15, 18, 19, 24, 27, 28, 37, 39, 42, 54, 57, 64, 69, 72, 82, 84, 87, 99, 177, 289.

Examples

			For n = 16:
- noz(15 + 16) = noz(31) = 31,
- noz(14 + 31) = noz(45) = 45,
- noz(13 + 45) = noz(58) = 58,
- noz(12 + 58) = noz(70) = 7,
- noz(11 + 7) = noz(18) = 18,
- noz(10 + 18) = noz(28) = 28,
- noz(9 + 28) = noz(37) = 37,
- noz(8 + 37) = noz(45) = 45,
- noz(7 + 45) = noz(52) = 52,
- noz(6 + 52) = noz(58) = 58,
- noz(5 + 58) = noz(63) = 63,
- noz(4 + 63) = noz(67) = 67,
- noz(3 + 67) = noz(70) = 7,
- noz(2 + 7) = noz(9) = 9,
- noz(1 + 9) = noz(10) = 1,
- hence a(16) = 1.
		

Crossrefs

Programs

  • Mathematica
    noz[n_] := FromDigits[DeleteCases[IntegerDigits[n], 0]];
    A321480[n_] := Block[{k = n}, Nest[noz[--k + #] &, n, Max[0, n-1]]];
    Array[A321480,100,0] (* Paolo Xausa, Apr 17 2024 *)
  • PARI
    a(n, base=10) = { my (t=n); forstep (k=n-1, 1, -1, t = fromdigits(select(sign, digits(t+k, base)), base)); t } \\ corrected by Rémy Sigrist, Apr 17 2024

Extensions

a(10), a(20), a(30), a(40), a(50) and a(60) corrected by Paolo Xausa, Apr 17 2024

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)
Showing 1-10 of 12 results. Next