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.

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)