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 14 results. Next

A107281 a(0) = 1, a(1) = 1, a(2) = 2 and for n >= 1: a(n+1) = SORT[a(n) + a(n-1) + a(n-2)] where SORT places digits in ascending order and deletes 0's.

Original entry on oeis.org

1, 1, 2, 4, 7, 13, 24, 44, 18, 68, 13, 99, 18, 13, 13, 44, 7, 46, 79, 123, 248, 45, 146, 349, 45, 45, 349, 349, 347, 145, 148, 46, 339, 335, 27, 17, 379, 234, 36, 469, 379, 488, 1336, 223, 247, 168, 368, 378, 149, 589, 1116, 1458, 1336, 139, 2339, 1348, 2368, 556, 2247
Offset: 0

Views

Author

Jonathan Vos Post, Jun 08 2005

Keywords

Comments

The maximum value is 56899, which first occurs at a(275). The maximum next occurs at a(977). T. D. Noe verified that the terms around a(275) and a(977) are the same. Hence the period is 977 - 275 = 702. The actual period starts at a(24) with the interesting terms 349, 45, 45, 349, 349. For some different initial conditions, the period is different. The point of the SORT operation here is that it "mixes" the sequence and the questions are, considering cycles as orbits, all about ergodicity. To turn this into the sorted Fibonacci sequence (A069638), use a(0)=0, a(1)=1, a(2)=1. This is a "base" sequence, but has analogs in other bases; for instance, SORT(base 2)[n] means count the 1's in the binary, call that k and output 2^(k-1). How does this sequence depend on SORT(base M)[n] for various M? Are there any initial values such that the sequence us unbounded? If not, how does cycle length depend upon initial values?

Examples

			a(8) = 18 because a(5) + a(6) + a(7) = 13 + 24 + 44 = 81 and SORT(81) = 18.
		

Crossrefs

Programs

  • Mathematica
    nxt[{a_,b_,c_}]:=Module[{d=FromDigits[Sort[IntegerDigits[a+b+c]]]}, {b,c,d}]; Transpose[NestList[nxt,{1,1,2},65]][[1]]  (* Harvey P. Dale, Feb 07 2011 *)

Formula

a(0) = 1, a(1) = 1, a(2) = 2 and for n>1: a(n+1) = SORT[a(n) + a(n-1) + a(n-2)] where SORT places digits in ascending order and deletes 0.

A108564 a(0) = 0, a(1) = 1, a(2) = 1, a(3) = 2, a(4) = 4, for n>3: a(n+1) = SORT[a(n) + a(n-1) + a(n-2) + a(n-3)], where SORT places digits in ascending order and deletes 0's.

Original entry on oeis.org

0, 1, 1, 2, 4, 8, 15, 29, 56, 18, 118, 122, 134, 239, 136, 136, 456, 679, 147, 1148, 234, 228, 1577, 1378, 1347, 345, 4467, 3577, 3679, 1268, 11299, 12389, 23568, 24458, 11477, 12789, 22279, 137, 24668, 35789, 23788, 23488, 13377, 24469, 12258, 23579
Offset: 0

Views

Author

Jonathan Vos Post, Jun 10 2005

Keywords

Comments

Sorted tetranacci numbers, a.k.a. sorted Fibonacci 4-step sequence.
As found by T. D. Noe: Max=4556699. Cycle period=41652. Cycle starts with the 23944th term.

Examples

			a(8) = SORT[a(4) + a(5) + a(6) + a(7)] = SORT[108] = 18.
a(10) = SORT[a(6) + a(7) + a(8) + a(9)] = SORT[221] = 122.
		

Crossrefs

Programs

A237568 Fibonacci-like sequence of numbers with nondecreasing positive digits. Let a^+ denote the number that is obtained from a if its positive digits are written in nondecreasing order, while zeros remain in their places. Let a<+>b = (a + b)^+. a(0)=0, a(1)=1, for n>=2, a(n) = a(n-1) <+> a(n-2).

Original entry on oeis.org

0, 1, 1, 2, 3, 5, 8, 13, 12, 25, 37, 26, 36, 26, 26, 25, 15, 40, 55, 59, 114, 137, 125, 226, 135, 136, 127, 236, 336, 257, 359, 166, 255, 124, 379, 305, 468, 377, 458, 358, 168, 256, 244, 500, 447, 479, 269, 478, 477, 559, 1036, 1559, 2559, 1148, 3707, 4558, 2568, 1267, 3358, 2456, 1458, 1349, 2708, 4057, 5667, 2479, 1468, 3479, 4479, 5789, 10268, 15067, 23355, 22348
Offset: 0

Views

Author

Vladimir Shevelev, Feb 09 2014

Keywords

Comments

Note that operation n^+ differs from the one in A004185. If a term of the sequence has k digits, then it is followed by terms with >=k digits. The sequence has 7 terms with 1 digit, 13 terms with 2 digits, 30 terms with 3 digits, etc. The corresponding maximal terms are 8, 59, 559, etc.
The sequence is eventually periodic with period of length 144 and the first position of period 237. - Peter J. C. Moses, Feb 09 2014

Crossrefs

Programs

  • Mathematica
    a[0]:=0;a[1]:=1;a[n_]:=a[n]=FromDigits[Insert[DeleteCases[Sort[#],0],0,1+#-Range[Length[#]]&[Position[#,0]]]&[IntegerDigits[a[n-1]+a[n-2]]]]; Map[a,Range[0,99]] (* Peter J. C. Moses, Feb 09 2014 *)

A237575 Fibonacci-like numbers with nonincreasing positive digits. Let a** denote the number that is obtained from a if its digits are written in nonincreasing order. Let a<+>b = (a + b)**. a(0)=0, a(1)=1, for n>=2, a(n) = a(n-1) <+> a(n-2).

Original entry on oeis.org

0, 1, 1, 2, 3, 5, 8, 31, 93, 421, 541, 962, 5310, 7622, 93221, 843100, 963321, 8642110, 9654310, 98642210, 986522100, 8654311100, 9864332000, 88654311100, 98865431100, 987754221100, 9866652211000, 86544432110000, 98644321110000, 888755322110000
Offset: 0

Views

Author

Vladimir Shevelev, Feb 09 2014

Keywords

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<2, n, parse(cat(
          sort(convert(a(n-1)+a(n-2), base, 10), `>`)[])))
        end:
    seq(a(n), n=0..30);  # Alois P. Heinz, Aug 31 2022
  • Mathematica
    a[0]:=0;a[1]:=1;a[n_]:=a[n]=FromDigits[Reverse[Sort[IntegerDigits[a[n-1]+a[n-2]]]]];Map[a,Range[0,20]] (* Peter J. C. Moses, Feb 09 2014 *)

Extensions

Correction and extension by Peter J. C. Moses

A237671 Let m_n denote the number which is obtained from n-base representation of m if its digits are written in nondecreasing order; then a(n) is the smallest period of the sequence which is defined by the recurrence b(0)=0, b(1)=1, b(k)=(b(k-1) + b(k-2))_n, for k>=2, or a(n)=0, if there is no such period.

Original entry on oeis.org

1, 3, 16, 6, 20, 24, 16, 36, 120, 300, 20, 288, 28, 192, 200, 552, 180, 192, 180, 1380, 224, 60, 1728, 912, 3800, 756, 576, 1776, 4102, 15480, 3540, 1344, 10800, 14328, 800, 2304, 1520, 1890, 1232, 11280, 9040, 31152, 49544, 3660, 6360, 3696, 13248, 21408
Offset: 2

Views

Author

Keywords

Comments

We conjecture that the sequence b is always eventually periodic, and so a(n)>0.

Examples

			For n=5, b-sequence begins 0,1,1,2,3,1,4,1,1,2,... It has period {1,1,2,3,1,4} of length 6. So a(5)=6.
a(10) = 120, because the eventual period of A069638 is 120.
		

Crossrefs

Programs

  • Python
    import sympy,functools
    def digits2int(x,b):
      return functools.reduce(lambda n,d:b*n+d,x,0)
    def A237671(n):
      return next(sympy.cycle_length(lambda x:(x[1],digits2int(sorted(sympy.ntheory.factor_.digits(sum(x),n)[1:]),n)),(0,1)))[0] # Pontus von Brömssen, Aug 28 2020

A108565 a(0) = 0, a(1) = a(2) = 1, a(3) = 2, a(4) = 4, for n>3: a(n+1) = SORT[ a(n) + a(n-1) + a(n-2) + a(n-3) + a(n-4)], where SORT places digits in ascending order and deletes 0's.

Original entry on oeis.org

0, 1, 1, 2, 4, 8, 16, 13, 34, 57, 128, 248, 48, 155, 366, 459, 1267, 2259, 456, 478, 1499, 5599, 1129, 1169, 4789, 11458, 12444, 3899, 33579, 16669, 4789, 1378, 1346, 15677, 35899, 5899, 1699, 256, 3459, 12247, 2356, 127, 14458, 23467, 25556, 45669, 12779
Offset: 0

Views

Author

Jonathan Vos Post, Jun 10 2005

Keywords

Comments

Sorted Pentanacci Numbers, a.k.a. Sorted Fibonacci 5-step Sequence.
Corrected and extended by T. D. Noe, who also found that Max = 334566999 occurs at a(67701). However, this is the only time that the maximum occurs. The cycle period has length 251784 and begins at a(1183787). Primes include: a(3) = 2, a(7) = 13, a(20) = 1499, a(22) = 1129, a(24) = 4789, a(30) = 4789, a(34) = 35899, a(36) = 1699, a(41) = 127, a(52) = 124577, a(62) = 33889, a(66) = 1579, a(67) = 25667, a(71) = 2789, a(80) = 4567, a(82) = 57899, a(87) = 23399, a(89) = 245899, a(90) = 349, a(93) = 346669. Semiprimes include: a(4) = 4 = 2^2, a(8) = 34 = 2 * 17, a(9) = 57 = 3 * 19, a(13) = 155 = 5 * 31, a(16) = 1267 = 7 * 181, a(19) = 478 = 2 * 239, a(21) = 5599 = 11 * 509, a(23) = 1169 = 7 * 167, a(27) = 3899 = 7 * 557, a(29) = 16669 = 79 * 211, a(32) = 1346 = 2 * 673, a(33) = 15677 = 61 * 257, a(35) = 5899 = 17 * 347, a(38) = 3459 = 3 * 1153, a(39) = 12247 = 37 * 331, a(42) = 14458 = 2 * 7229, a(43) = 23467 = 31 * 757, a(46) = 12779 = 13 * 983, a(48) = 12779 = 13 * 983, a(51) = 234557 = 163 * 1439, a(53) = 47899 = 19 * 2521, a(54) = 12459 = 3 * 4153, a(58) = 158 = 2 * 79, a(60) = 22299 = 3 * 7433, a(64) = 4579 = 19 * 241, a(65) = 689 = 13 * 53, a(70) = 24599 = 17 * 1447, a(74) = 26678 = 2 * 13339, a(75) = 1579, a(77) = 16789 = 103 * 163, a(78) = 2489 = 19 * 131, a(84) = 111379 = 127 * 877, a(85) = 122333 = 71 * 1723, a(86) = 34899 = 3 * 11633, a(99) = 1344479 = 17 * 79087, a(100) = 1245889 = 337 * 3697.

Examples

			a(8) = SORT[a(3) + a(4) + a(5) + a(6) + a(7)] = SORT[61] = 16.
		

Crossrefs

Programs

  • Mathematica
    nxt[{a_,b_,c_,d_,e_}]:={b,c,d,e,FromDigits[Select[Sort[ IntegerDigits[ a+b+c+d+e]],#!=0&]]}; NestList[nxt,{0,1,1,2,4},50][[All,1]]

A108566 a(0) = 0, a(1) = a(2) = 1, a(3) = 2, a(4) = 4, a(5) = 8, for n>4: a(n+1) = SORT[ a(n) + a(n-1) + a(n-2) + a(n-3) + a(n-4) + a(n-5)], where SORT places digits in ascending order and deletes 0's.

Original entry on oeis.org

0, 1, 1, 2, 4, 8, 16, 23, 45, 89, 158, 339, 67, 127, 258, 138, 178, 117, 588, 146, 1245, 1224, 3489, 689, 1378, 1178, 239, 1789, 2678, 1579, 1488, 1589, 2369, 11249, 2259, 2335, 12289, 239, 347, 12788, 2357, 3355, 13357, 23344, 45558, 1579, 5589
Offset: 0

Views

Author

Jonathan Vos Post, Jun 10 2005

Keywords

Comments

Extended by T. D. Noe, who also found that verified that the maximum is attained at a(48968063)=12336789999. The periodic part of the sequence begins with a(4847516) and has length 156501072. So the maximum is in the periodic part. Primes include: a(3) = 2, a(7) = 23, a(9) = 89, a(12) = 67, a(13) = 127, a(27) = 1789, a(29) = 1579, a(36) = 12289, a(37) = a(26) = 239, a(38) = 347, a(40) = 2357, a(45) = 1579, a(58) = 25579, a(59) = 23459. Semiprimes include: a(4) = 4 = 2^2, a(10) = 158 = 2 * 79, a(11) = 339 = 3 * 113, a(16) = 178 = 2 * 89, a(19) = 146 = 2 * 73, a(22) = 3489 = 3 * 1163, a(23) = 689 = 13 * 53, a(31) = 1589 = 7 * 227, a(32) = 2369 = 23 * 103, a(33) = 11249 = 7 * 1607, a(35) = 2335 = 5 * 467, a(47) = 22789 = 13 * 1753, a(50) = 178999 = 19 * 9421, a(54) = 14567 = 7 * 2081, a(55) = 23469 = 3 * 7823, a(57) = 22467 = 3 * 7489, a(60) = 12499 = 29 * 431, a(63) = 1477 = 7 * 211, a(66) = 799 = 17 * 47.

Examples

			a(7) = SORT[a(2) + a(3) + a(4) + a(5) + a(6) + a(7)] = SORT[1 + 1 + 2 + 4 + 8 + 16] = SORT[32] = 23.
		

Crossrefs

Cf. A001592, A069638, A107281, A108564, A108565, 108567-108573.

Programs

  • Mathematica
    nxt[{a_,b_,c_,d_,e_,f_}]:={b,c,d,e,f,FromDigits[Sort[IntegerDigits[Total[{a,b,c,d,e,f}]]]]}; NestList[nxt,{0,1,1,2,4,8},50][[All,1]] (* Harvey P. Dale, May 05 2022 *)

Formula

Sorted hexanacci numbers, a.k.a. sorted Fibonacci 6-step sequence.

A305753 A base-3/2 sorted Fibonacci sequence that starts with a(0) = 0 and a(1) = 1. The terms are interpreted as numbers written in base 3/2. To get a(n+2), add a(n) and a(n+1), write the result in base 3/2 and sort the "digits" into increasing order, omitting all zeros.

Original entry on oeis.org

0, 1, 1, 2, 2, 12, 12, 112, 112, 1112, 1112, 11112, 11112, 111112, 111112, 1111112, 1111112, 11111112, 11111112, 111111112, 111111112, 1111111112, 1111111112, 11111111112, 11111111112, 111111111112, 111111111112, 1111111111112, 1111111111112, 11111111111112, 11111111111112
Offset: 0

Views

Author

Tanya Khovanova and PRIMES STEP Senior group, Jun 09 2018

Keywords

Comments

In base 10, the corresponding sequence is A069638 and is periodic.

Examples

			Write decimal numbers as x_10, base-3/2 numbers as x_b (see A024629).
We have a(1) = 1, a(2) = 2 (in both bases).
Adding, we get 1+2 = 3_10 = 20_b, and sorting the digits gives a(3) = 2_b = 2_10.
Adding 2 and 2 we get 4_10 = 21_b, and sorting the digits gives a(4) = 12_b = (7/2)_10.
Adding 2 and 7/2 we get (11/2)_10 = 201_b, and sorting the digits gives a(5) = 12_b = (7/2)_10.
Adding (7/2)_10 and (7/2)_10 we get 7_10 = 211_b, and sorting the digits gives a(6) = 112_b = (23/4)_10.
Adding (7/2)_10 and (23/4)_10 we get (37/4)_10 = 2011_b, and sorting the digits gives a(7) = 112_b = (23/4)_10.
And so on.
		

Crossrefs

This is A047855 with terms repeated. - N. J. A. Sloane, Jun 19 2018

Programs

  • PARI
    concat(0, Vec(x*(1 - 3*x)*(1 + 3*x) / ((1 - x)*(1 - 10*x^2)) + O(x^40))) \\ Colin Barker, Jun 19 2018

Formula

From Colin Barker, Jun 14 2018: (Start)
Generating function: x*(1 - 3*x)*(1 + 3*x) / ((1 - x)*(1 - 10*x^2)).
a(n) = (10^(n/2) + 80) / 90 for n>0.
a(n) = (10^((n-1)/2) + 8) / 9 for n>0.
a(n) = a(n-1) + 10*a(n-2) - 10*a(n-3) for n>4.
(End)

Extensions

Edited by N. J. A. Sloane, Jun 22 2018

A305880 A base 3/2 reverse sorted Fibonacci sequence that starts with terms 2211 and 2211. The terms are interpreted as numbers written in base 3/2. To get a(n+2), add a(n) and a(n+1), write the result in base 3/2 and sort the digits into decreasing order, omitting all zeros.

Original entry on oeis.org

2211, 2211, 22211, 22211, 222211, 222211, 2222211, 2222211, 22222211, 22222211, 222222211, 222222211, 2222222211, 2222222211, 22222222211, 22222222211, 222222222211, 222222222211, 2222222222211, 2222222222211, 22222222222211, 22222222222211
Offset: 1

Views

Author

Tanya Khovanova and PRIMES STEP Senior group, Jun 13 2018

Keywords

Comments

a(2n-1) and a(2n) consist of n+1 2's followed by 2 1's.
If a reverse sorted Fibonacci sequence starts with any two numbers, then it eventually becomes either cyclic or turns into this sequence.
In base 10, the corresponding sequence is A069638 and is periodic.

Examples

			2211 + 2211 equals 210122 when all numbers are interpreted in base 3/2; after sorting and omitting 0's we obtain a(2) = 22211.
(A305753 has more detailed examples which may help explain the calculations here. - _N. J. A. Sloane_, Jun 22 2018)
		

Crossrefs

Formula

From Colin Barker, Jun 19 2018: (Start)
G.f.: x*(2211 - 2110*x^2) / ((1 - x)*(1 - 10*x^2)).
a(n) = (2^((n+5)/2+3/2) * 5^((n+5)/2+1/2) - 101) / 9 for n even.
a(n) = (2^((n+9)/2) * 5^((n+7)/2) - 101) / 9 for n odd.
a(n) = a(n-1) + 10*a(n-2) - 10*a(n-3) for n>3.
(End)

A370254 a(0) = 1, a(n) = result of eliminating the digit 7 from the sum of all previous terms for n>=1.

Original entry on oeis.org

1, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 3268, 36036, 202, 224, 2498, 4996, 9992, 89984, 19968, 199936, 39982, 439854, 8908, 888616, 1232, 18464, 196928, 1993856, 39812, 402524, 4430048, 8860096, 120192, 1840384, 1968068
Offset: 0

Views

Author

Sergio Pimentel, Feb 13 2024

Keywords

Examples

			a(16) = 3268 since the sum of a(0)..a(15) = 32768. Eliminating the "7" we get 3268.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 1, (l-> add(l[i]*10^(i-1),
          i=1..nops(l)))(subs(7=NULL, convert(s(n-1), base, 10))))
        end:
    s:= proc(n) option remember; `if`(n<0, 0, s(n-1)+a(n)) end:
    seq(a(n), n=0..40);  # Alois P. Heinz, Feb 15 2024
  • Mathematica
    Module[{nmax=50, s=1, a}, NestList[(s+=(a=FromDigits[DeleteCases[IntegerDigits[s], 7]]); a) &, s, nmax]] (* Paolo Xausa, Feb 19 2024 *)
  • PARI
    lista(nn) = my(va = vector(nn)); va[1] = 1; for (n=2, nn, va[n] = sum(k=1, n-1, va[k]); my(d=digits(va[n])); if (vecsearch(Set(d), 7), my(list = List()); for (i=1, #d, if (d[i] !=7, listput(list, d[i]));); va[n] = fromdigits(Vec(list)););); va; \\ Michel Marcus, Feb 13 2024

Formula

a(n) = A004182(Sum_{i=0..n-1} a(i)) for n >= 1, a(0) = 1.
a(n) = A011782(n) for n <= 15.
Showing 1-10 of 14 results. Next