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

A276622 Simple self-inverse permutation of natural numbers: after a(0)=0, list each block of A261234(n) numbers in reverse order, from A261232(n) to A261233(1+n).

Original entry on oeis.org

0, 1, 3, 2, 8, 7, 6, 5, 4, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 123, 122, 121, 120, 119, 118, 117, 116, 115, 114, 113, 112, 111, 110, 109, 108, 107, 106, 105, 104, 103, 102, 101, 100, 99, 98, 97, 96
Offset: 0

Views

Author

Antti Karttunen, Sep 11 2016

Keywords

Comments

Maps between A276623 and A276624.

Crossrefs

Programs

Formula

a(0) = 0; for n >= 1, a(n) = A261232(A276621(n)-1) + A261232(A276621(n)) - n - 1.

A261234 a(n) = number of steps to reach (3^n)-1 when starting from k = (3^(n+1))-1 and repeatedly applying the map that replaces k with k - (sum of digits in base-3 representation of k).

Original entry on oeis.org

1, 2, 5, 12, 29, 74, 196, 530, 1445, 3956, 10862, 29901, 82592, 229233, 639967, 1797288, 5073707, 14381347, 40890492, 116559600, 333043360, 953890490, 2738788806, 7881915828, 22729464587, 65652788211, 189866467219, 549596773550, 1592118137130, 4615680732717, 13392399641613, 38894563977633, 113074467549440, 329080350818600, 958725278344368, 2795854777347489
Offset: 0

Views

Author

Antti Karttunen, Aug 13 2015

Keywords

Crossrefs

First differences of A261232 and A261233.
Sum of A261236 and A261237.
Cf. A261235 (first differences of this sequence).
Cf. also A213709.

Programs

  • Mathematica
    Table[Length@ NestWhileList[# - Total@ IntegerDigits[#, 3] &, 3^(n + 1) - 1, # > 3^n - 1 &] - 1, {n, 0, 16}] (* Michael De Vlieger, Jun 27 2016 *)

Formula

a(n) = A261236(n) + A261237(n).

Extensions

a(23)-a(35) from Hiroaki Yamanouchi, Aug 16 2015

A261233 a(n) = number of steps to reach 0 when starting from k = (3^n)-1 and repeatedly applying the map that replaces k with k - (sum of digits in base-3 representation of k).

Original entry on oeis.org

0, 1, 3, 8, 20, 49, 123, 319, 849, 2294, 6250, 17112, 47013, 129605, 358838, 998805, 2796093, 7869800, 22251147, 63141639, 179701239, 512744599, 1466635089, 4205423895, 12087339723, 34816804310, 100469592521, 290336059740, 839932833290, 2432050970420, 7047731703137, 20440131344750, 59334695322383, 172409162871823, 501489513690423, 1460214792034791
Offset: 0

Views

Author

Antti Karttunen, Aug 13 2015

Keywords

Crossrefs

One less than A261232.
Cf. A261234 (the first differences).
Cf. also A218600.

Formula

a(0) = 0; for n >= 1, a(n) = A261234(n-1) + a(n-1).
a(n) = A261231((3^n)-1).
a(n) = A261232(n)-1.

Extensions

Terms from a(24) onward added from the output of Hiroaki Yamanouchi's program by Antti Karttunen, Aug 16 2015

A261231 a(n) = number of steps to reach 0 when starting from k = n and repeatedly applying the map that replaces k with k - (sum of digits in base-3 representation of k).

Original entry on oeis.org

0, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 15, 15, 15, 16, 16, 16, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 21, 21, 21, 22, 22, 22, 23, 23, 23, 24, 24, 24
Offset: 0

Views

Author

Antti Karttunen, Aug 12 2015

Keywords

Crossrefs

Programs

  • Python
    from sympy.ntheory.factor_ import digits
    def a054861(n): return (n - sum(digits(n, 3)[1:]))/2
    def a(n): return 0 if n==0 else 1 + a(2*a054861(n)) # Indranil Ghosh, May 22 2017

Formula

a(0) = 0; for n >= 1, a(n) = 1 + a(2*A054861(n)). [Note that A054861(n) = (n - A053735(n))/2, where A053735(n) = sum of digits of n, when written in base 3.]
Showing 1-4 of 4 results.