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.

A056991 Numbers with digital root 1, 4, 7 or 9.

Original entry on oeis.org

1, 4, 7, 9, 10, 13, 16, 18, 19, 22, 25, 27, 28, 31, 34, 36, 37, 40, 43, 45, 46, 49, 52, 54, 55, 58, 61, 63, 64, 67, 70, 72, 73, 76, 79, 81, 82, 85, 88, 90, 91, 94, 97, 99, 100, 103, 106, 108, 109, 112, 115, 117, 118, 121, 124, 126, 127, 130, 133, 135, 136, 139, 142
Offset: 1

Views

Author

Keywords

Comments

All squares are members (see A070433).
May also be defined as: possible sums of digits of squares. - Zak Seidov, Feb 11 2008
First differences are periodic: 3, 3, 2, 1, 3, 3, 2, 1, 3, 3, 2, 1, 3, 3, 2, 1, 3, 3, 2, 1, 3, 3, 2, 1, 3, 3, 2, 1, ... - Zak Seidov, Feb 11 2008
Minimal n with corresponding sum-of-digits(n^2) are: 1, 2, 4, 3, 8, 7, 13, 24, 17, 43, 67, 63, 134, 83, 167, 264, 314, 313, 707, 1374, 836, 1667, 2236, 3114, 4472, 6833, 8167, 8937, 16667, 21886, 29614, 60663, 41833, 74833, 89437, 94863, 134164, 191833.
a(n) is the set of all m such that 9k+m can be a perfect square (quadratic residues of 9 including the trivial case of 0). - Gary Detlefs, Mar 19 2010
From Klaus Purath, Feb 20 2023: (Start)
The sum of digits of any term belongs to the sequence. Also the products of any terms belong to the sequence.
This is the union of A017173, A017209, A017245 and A008591.
Positive integers of the forms x^2 + (2*m+1)*x*y + (m^2+m-2)*y^2, for integers m.
This sequence is closed under multiplication. (End)

Crossrefs

For complement see A268226.

Programs

  • Maple
    seq( 3*(n-floor(n/4)) - (3-I^n-(-I)^n-(-1)^n)/2, n=1..63); # Gary Detlefs, Mar 19 2010
  • Mathematica
    LinearRecurrence[{1,0,0,1,-1},{1,4,7,9,10},70] (* Harvey P. Dale, Aug 29 2015 *)
  • PARI
    forstep(n=1,1e3,[3,3,2,1],print1(n", ")) \\ Charles R Greathouse IV, Sep 21 2012

Formula

From R. J. Mathar, Feb 14 2008: (Start)
O.g.f.: x*(2x+1)*(x^2+x+1)/((-1+x)^2*(x+1)*(x^2+1)).
a(n) = a(n-4) + 9. (End)
a(n) = 3*(n - floor(n/4)) - (3 - i^n - (-i)^n - (-1)^n)/2, where i = sqrt(-1). - Gary Detlefs, Mar 19 2010
a(n) = a(n-1)+a(n-4)-a(n-5). - Wesley Ivan Hurt, May 27 2021
a(n) = 3*n - floor(n/4) - 2*floor((n+3)/4). - Ridouane Oudra, Jan 21 2024
E.g.f.: (cos(x) + (9*x - 1)*cosh(x) - 3*sin(x) + (9*x - 2)*sinh(x))/4. - Stefano Spezia, Feb 21 2024

Extensions

Edited by N. J. A. Sloane, May 16 2008 at the suggestion of R. J. Mathar