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.

A349896 Record values in A349876.

Original entry on oeis.org

0, 9, 6144, 8850, 63294, 167460, 1471350, 17358894, 19273044, 90701559, 153178644, 189719685, 197747394, 2017743225, 6233637435, 59571334269, 86021383575, 156569713710, 2073505928019, 2889765691185, 17962980751950, 56300638961700, 277087084821075, 329363647943184
Offset: 1

Views

Author

Nicholas Drozd, Dec 04 2021

Keywords

Crossrefs

Cf. A349876.

Programs

  • PARI
    f(n) = my(d=divrem(n, 3)); if (d[2], f(5*d[1]+d[2]+3), n); \\ A349876
    lista(nn) = {my(r=0); for (n=1, nn, my(x = f(n)); if (x>r, print1(x, ", "); r=x););} \\ Michel Marcus, Dec 06 2021

A353313 If n is of the form 3k, then a(n) = k, and if n is of the form 3k+r, with r = 1 or 2, then a(n) = 5*k + 3 + r.

Original entry on oeis.org

0, 4, 5, 1, 9, 10, 2, 14, 15, 3, 19, 20, 4, 24, 25, 5, 29, 30, 6, 34, 35, 7, 39, 40, 8, 44, 45, 9, 49, 50, 10, 54, 55, 11, 59, 60, 12, 64, 65, 13, 69, 70, 14, 74, 75, 15, 79, 80, 16, 84, 85, 17, 89, 90, 18, 94, 95, 19, 99, 100, 20, 104, 105, 21, 109, 110, 22, 114, 115, 23, 119, 120, 24, 124, 125, 25, 129, 130, 26
Offset: 0

Views

Author

Antti Karttunen, Apr 13 2022

Keywords

Comments

It is conjectured that all iterations of this sequence starting from any n >= 0 will eventually reach a finite cycle, which by necessity then contains at least one multiple of three. See Drozd links and A349876.

Crossrefs

Cf. A353305 (the smallest number reached after the starting point n), A353309 (the largest base-3 digit sum reached after the starting point n).

Programs

  • Mathematica
    Table[With[{c=Mod[n,3]},If[c==0,n/3,(5n-2c+9)/3]],{n,0,80}]  (* Harvey P. Dale, Aug 09 2025 *)
  • PARI
    A353313(n) = { my(r=(n%3)); if(!r,n/3,((5*((n-r)/3)) + r + 3)); };

A353314 If n is of the form 3k, then a(n) = n, and if n is of the form 3k+r, with r = 1 or 2, then a(n) = 5*k + 3 + r.

Original entry on oeis.org

0, 4, 5, 3, 9, 10, 6, 14, 15, 9, 19, 20, 12, 24, 25, 15, 29, 30, 18, 34, 35, 21, 39, 40, 24, 44, 45, 27, 49, 50, 30, 54, 55, 33, 59, 60, 36, 64, 65, 39, 69, 70, 42, 74, 75, 45, 79, 80, 48, 84, 85, 51, 89, 90, 54, 94, 95, 57, 99, 100, 60, 104, 105, 63, 109, 110, 66, 114, 115, 69, 119, 120, 72, 124, 125, 75, 129, 130
Offset: 0

Views

Author

Antti Karttunen, Apr 14 2022

Keywords

Crossrefs

Cf. A353313 (variant), A349876 (the first multiple of 3 reached when iterating this sequence), A349877 (number of iterations to reach the first multiple of 3), A353327 (A102899).

Programs

  • Mathematica
    Array[If[#2 == 0, #1, 5 #1 + 3 + #2 & @@ QuotientRemainder[#1, 3]] & @@ {#, Mod[#, 3]} &, 78, 0] (* Michael De Vlieger, Apr 14 2022 *)
  • PARI
    A353314(n) = { my(r=(n%3)); if(!r,n,((5*((n-r)/3)) + r + 3)); };

Formula

a(n) = n + A353327(n) = n + A102899(3+n).
From Chai Wah Wu, Jul 27 2022: (Start)
a(n) = 2*a(n-3) - a(n-6) for n > 5.
G.f.: x*(x^3 + 3*x^2 + 5*x + 4)/(x^6 - 2*x^3 + 1). (End)

A349877 a(n) is the number of times the map x -> A353314(x) needs to be applied to n to reach a multiple of 3, or -1 if the trajectory never reaches a multiple of 3.

Original entry on oeis.org

0, 2, 14, 0, 1, 13, 0, 4, 1, 0, 12, 3, 0, 1, 3, 0, 4, 1, 0, 11, 2, 0, 1, 2, 0, 2, 1, 0, 2, 3, 0, 1, 3, 0, 10, 1, 0, 4, 5, 0, 1, 7, 0, 3, 1, 0, 3, 2, 0, 1, 2, 0, 2, 1, 0, 2, 4, 0, 1, 9, 0, 3, 1, 0, 3, 4, 0, 1, 5, 0, 6, 1, 0, 4, 2, 0, 1, 2, 0, 2, 1, 0, 2, 7, 0, 1, 4, 0, 6, 1, 0, 6, 3, 0, 1, 3, 0, 5, 1, 0, 8, 2, 0
Offset: 0

Views

Author

Nicholas Drozd, Dec 03 2021

Keywords

Comments

Equally, number of iterations of A353313 needed to reach a multiple of 3, or -1 if no multiple of 3 is ever reached. - Antti Karttunen, Apr 14 2022

Examples

			a(1) = 2 : 1 -> 4 -> 9 (as it takes two applications of A353314 to reach a multiple of three),
a(2) = 14 : 2 -> 5 -> 10 -> 19 -> 34 -> 59 -> 100 -> 169 -> 284 -> 475 -> 794 -> 1325 -> 2210 -> 3685 -> 6144
a(3) = 0 : 3 (as the starting point 3 is already a multiple of 3).
a(4) = 1 : 4 -> 9
a(7) = 4 : 7 -> 14 -> 25 -> 44 -> 75.
		

Crossrefs

Programs

  • PARI
    A353314(n) = { my(r=(n%3)); if(!r,n,((5*((n-r)/3)) + r + 3)); };
    A349877(n) = { my(k=0); while(n%3, k++; n = A353314(n)); (k); }; \\ Antti Karttunen, Apr 14 2022
  • Python
    import itertools
    def f(n):
        for i in itertools.count():
            quot, rem = divmod(n, 3)
            if rem == 0:
                return i
            n = (5 * quot) + rem + 3
    

Formula

From Antti Karttunen, Apr 14 2022: (Start)
If A010872(n) = 0 then a(n) = 0, otherwise a(n) = 1 + a(A353314(n)).
a(n) < A353311(n) for all n.
(End)

Extensions

Definition corrected and more terms from Antti Karttunen, Apr 14 2022
Showing 1-4 of 4 results.