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.

A343265 a(n) is the number of ways n can be reached starting from 0 and using only two operations: adding one or, once n > 1, squaring.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13
Offset: 0

Views

Author

James P. B. Hall, Apr 09 2021

Keywords

Crossrefs

Cf. A097046.

Programs

  • Mathematica
    a[0]:=1; a[n_]:=If[IntegerQ[Sqrt[n]],a[n-1]+a[Sqrt[n]],a[n-1]]; Table[a[n],{n,0,80}] (* Stefano Spezia, May 06 2021 *)

Formula

a(n) = a(n-1) + a(sqrt(n)) if n is a square or a(n-1) otherwise.