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-10 of 20 results. Next

A067179 Smallest number whose square has sum of digits A056991(n).

Original entry on oeis.org

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, 298327, 545793, 547613, 947617, 987917
Offset: 1

Views

Author

Amarnath Murthy, Jan 09 2002

Keywords

Comments

a(n) is the smallest number whose square has the n-th possible digit sum.

Crossrefs

Formula

a(n) = sqrt(A067178(n)).

Extensions

Corrected and extended by Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 24 2003
Offset corrected by Giovanni Resta, Jun 27 2018
Name corrected by Jon E. Schoenfield, Feb 18 2024

A067178 Smallest square whose sum of digits is A056991(n).

Original entry on oeis.org

1, 4, 16, 9, 64, 49, 169, 576, 289, 1849, 4489, 3969, 17956, 6889, 27889, 69696, 98596, 97969, 499849, 1887876, 698896, 2778889, 4999696, 9696996, 19998784, 46689889, 66699889, 79869969, 277788889, 478996996, 876988996, 3679999569, 1749999889
Offset: 1

Views

Author

Amarnath Murthy, Jan 09 2002

Keywords

Comments

The smallest square giving a possible digit sum.

Crossrefs

Extensions

Corrected and extended by Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 24 2003
Offset corrected. - R. J. Mathar, Aug 26 2009

A268226 Complement of A056991.

Original entry on oeis.org

2, 3, 5, 6, 8, 11, 12, 14, 15, 17, 20, 21, 23, 24, 26, 29, 30, 32, 33, 35, 38, 39, 41, 42, 44, 47, 48, 50, 51, 53, 56, 57, 59, 60, 62, 65, 66, 68, 69, 71, 74, 75, 77, 78, 80, 83, 84, 86, 87, 89, 92, 93, 95, 96, 98, 101, 102, 104, 105, 107, 110, 111, 113, 114
Offset: 1

Views

Author

N. J. A. Sloane, Jan 30 2016

Keywords

Crossrefs

Cf. A056991.

Programs

  • Magma
    I:=[2,3,5,6,8,11]; [n le 6 select I[n]  else Self(n-1) +Self(n-5) -Self(n-6): n in [1..70]]; // Vincenzo Librandi, Feb 06 2016
  • Mathematica
    Select[Range@ 100, MemberQ[{0, 2, 3, 5, 6, 8}, #] &@ FixedPoint[Total@ IntegerDigits@ # &, #] &] (* Michael De Vlieger, Feb 01 2016 *)
  • PARI
    Vec(x*(2+x)*(1-x+x^2)*(1+x+x^2)/((1-x)^2*(1+x+x^2+x^3+x^4)) + O(x^100)) \\ Colin Barker, Feb 06 2016
    

Formula

From Colin Barker, Feb 06 2016: (Start)
a(n) = a(n-1)+a(n-5)-a(n-6) for n>6.
G.f.: x*(2+x)*(1-x+x^2)*(1+x+x^2) / ((1-x)^2*(1+x+x^2+x^3+x^4)).
(End)

Extensions

Warning: the Indian Journal of Science and Technology is run by the 'Science & Knowledge Publishing Corporation Limited', which is listed in Jeffrey Beall's list (http://scholarlyoa.com/publishers/) of predatory publishers. - Michel Marcus, Jan 31 2016

A056992 Digital roots of square numbers A000290.

Original entry on oeis.org

1, 4, 9, 7, 7, 9, 4, 1, 9, 1, 4, 9, 7, 7, 9, 4, 1, 9, 1, 4, 9, 7, 7, 9, 4, 1, 9, 1, 4, 9, 7, 7, 9, 4, 1, 9, 1, 4, 9, 7, 7, 9, 4, 1, 9, 1, 4, 9, 7, 7, 9, 4, 1, 9, 1, 4, 9, 7, 7, 9, 4, 1, 9, 1, 4, 9, 7, 7, 9, 4, 1, 9, 1, 4, 9, 7, 7, 9, 4, 1, 9, 1, 4, 9, 7, 7, 9
Offset: 1

Views

Author

Keywords

Comments

Cyclic with a period of nine. Note that (7, 9, 4, 1, 9, 1, 4, 9, 7) is palindromic.
a(n) is also the decimal expansion of 499264730/333333333. - Enrique Pérez Herrero, Jul 28 2009
a(n) is also the digital root of A002477(n). - Enrique Pérez Herrero, Dec 20 2009
First comment above by Enrique Pérez Herrero and his formula below together give the following identity: 1+Sum_{n>=2}(1+9*((n^2-1)/9-floor((n^2-1)/9)))/10^(n-1) = 499264730/333333333 = 1.49779419149779419149779419... - Alexander R. Povolotsky, Jun 14 2012

Crossrefs

Programs

  • Haskell
    a056992 = a010888 . a000290  -- Reinhard Zumkeller, Mar 19 2014
  • Mathematica
    DigitalRoot[n_Integer?NonNegative] := 1 + 9*FractionalPart[(n - 1)/9] A056992[n_]:=DigitalRoot[n^2] (* Enrique Pérez Herrero, Dec 20 2009 *)
    Table[FixedPoint[Total[IntegerDigits[#]]&,n^2],{n,90}] (* Zak Seidov, Jun 13 2015 *)
    PadRight[{},120,{1,4,9,7,7,9,4,1,9}] (* Harvey P. Dale, Apr 16 2022 *)

Formula

a(n) = 1+9*{(n^2-1)/9}, where the symbol {} means fractional part. - Enrique Pérez Herrero, Dec 20 2009
a(n) = 3(1 + cos(2n*Pi/3) + cos(4n*Pi/3)) + mod(3n^4+3n^6+4n^8,9). - Ant King, Oct 07 2009
G.f.: x*(1+4*x+9*x^2+7*x^3+7*x^4+9*x^5+4*x^6+x^7+9*x^8)/((1-x)*(1+x+x^2)*(1+x^3+x^6)). - Ant King, Oct 20 2009
a(n) = A010888(A057147(n)). - Reinhard Zumkeller, Mar 19 2014

A242660 Nonnegative numbers of the form x^2+xy-2y^2.

Original entry on oeis.org

0, 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, 144, 145, 148, 151, 153, 154, 157, 160, 162, 163, 166, 169, 171, 172, 175, 178, 180, 181
Offset: 1

Views

Author

N. J. A. Sloane, May 31 2014, Jun 03 2014

Keywords

Comments

Discriminant 9.
Are the positive entries the same as A056991? - R. J. Mathar, Jun 10 2014
We have x^2+xy-2y^2 = (x+2y)(x-y) which can be written as z(3x-2z) by letting z=x-y. All (x,z) pairs in the square 0<=x,z<=8 have values z(3x-2z) == {0,1,4,7} (mod 9), which shows that all positive terms of this sequence have digital roots that define A056991: this sequence is a subsequence of A056991 (with 0 as a special case). - R. J. Mathar, Jun 12 2014

Crossrefs

Primes in this sequence = A002476.

Programs

  • Maple
    # Maple Program fb, for indefinite binary quadratic forms
    # f = ax^2+bxy+cy^2 with discriminant d = b^2-4ac = s^2 a perfect square.
    # Looks for numbers 0 <= n <= M represented and also primes represented.
    fb:=proc(a,b,c,M) local s,t1,t2,n,d,dp;
    if not issqr(b^2-4*a*c) then error "disct not a square"; return; fi;
    s:=sqrt(b^2-4*a*c); t1:={0}; t2:={};
    for n from 1 to M do
    for d in numtheory[divisors](4*a*n) do dp:=4*a*n/d;
    if ((d-dp) mod 2*s) = 0 and (((b+s)*dp-(b-s)*d) mod 4*a*s) = 0
    then t1:={op(t1),n}; if isprime(n) then t2:={op(t2),n}; fi; break; fi;
                                        od:
                      od:
    [sort(convert(t1,list)), sort(convert(t2,list))];
    end;
    fb(1,1,-2,500);
  • Mathematica
    Select[Range[0, 1000], MatchQ[Mod[#, 9], Alternatives[0, 1, 4, 7]]&] (* Jean-François Alcover, Oct 31 2016 *)
  • PARI
    concat(0, Vec(x^2*(1+2*x)*(1+x+x^2)/((1-x)^2*(1+x)*(1+x^2)) + O(x^100))) \\ Colin Barker, Oct 31 2016

Formula

From Colin Barker, Oct 31 2016: (Start)
a(n) = a(n-1)+a(n-4)-a(n-5) for n>5.
G.f.: x^2*(1+2*x)*(1+x+x^2) / ((1-x)^2*(1+x)*(1+x^2)). (End)
E.g.f.: (8 + 3*cos(x) + (9*x - 11)*cosh(x) + sin(x) + (9*x - 10)*sinh(x))/4. - Stefano Spezia, Aug 05 2024

A174438 Numbers that are congruent to {0, 2, 5, 8} mod 9.

Original entry on oeis.org

0, 2, 5, 8, 9, 11, 14, 17, 18, 20, 23, 26, 27, 29, 32, 35, 36, 38, 41, 44, 45, 47, 50, 53, 54, 56, 59, 62, 63, 65, 68, 71, 72, 74, 77, 80, 81, 83, 86, 89, 90, 92, 95, 98, 99, 101, 104, 107, 108, 110, 113, 116, 117, 119, 122, 125, 126, 128, 131, 134, 135, 137
Offset: 1

Views

Author

Gary Detlefs, Mar 19 2010

Keywords

Comments

Also the set of nonnegative integers expressible as (x + 2y)(2x + y) for integer x and y, where integers of the form 3k + 2 are given by x = 2k + 1, y = -k, and integers of the form 9k are given by x = 2k - 1, y = 2 - k. - Drake Thomas, Nov 10 2022
From Klaus Purath, Feb 21 2023: (Start)
The sum of digits of any term belongs to the sequence. Also the products of an odd number of terms as well as products of one term each of this sequence and one term of A056991 are members. The products of an even number of terms belong to A056991.
Nonnegative integers of the forms 2*x^2 + (2*m+1)*x*y + ((m^2+m-2)/2)*y^2, for integers m. This includes the formula given by Drake Thomas above.
The union of this sequence and A056991 is closed under multiplication. (End)

Programs

  • Magma
    [n : n in [0..150] | n mod 9 in [0, 2, 5, 8]]; // Wesley Ivan Hurt, Jun 07 2016
    
  • Maple
    seq(3*(n-floor(n/4))-(3-I^n-(-I)^n-(-1)^n)/4, n=0..100);
  • Mathematica
    Table[(18n-15+I^(2n)+(3-I)*I^(-n)+(3+I)*I^n)/8, {n, 80}] (* Wesley Ivan Hurt, Jun 07 2016 *)
    Select[Range[0,150],MemberQ[{0,2,5,8},Mod[#,9]]&] (* Harvey P. Dale, Jan 02 2019 *)
    LinearRecurrence[{1,0,0,1,-1},{0,2,5,8,9},70] (* Harvey P. Dale, Jan 15 2022 *)
  • Python
    def A174438(n): return (0,2,5,8)[n&3]+9*(n>>2) # Chai Wah Wu, Jan 30 2023

Formula

a(n) = 3*(n-floor(n/4)) - (3 - i^n - (-i)^n - (-1)^n)/4 where i=sqrt(-1), offset=0.
From Wesley Ivan Hurt, Jun 07 2016: (Start)
G.f.: x^2*(2 + 3*x + 3*x^2 + x^3)/((x-1)^2*(1 + x + x^2 + x^3)).
a(n) = a(n-1) + a(n-4) - a(n-5) for n > 5.
a(n) = (18*n - 15 + i^(2*n) + (3-i)*i^(-n) + (3+i)*i^n)/8 where i=sqrt(-1). (End)

Extensions

a(23) corrected by Chai Wah Wu, Jun 10 2016

A301451 Numbers congruent to {1, 7} mod 9.

Original entry on oeis.org

1, 7, 10, 16, 19, 25, 28, 34, 37, 43, 46, 52, 55, 61, 64, 70, 73, 79, 82, 88, 91, 97, 100, 106, 109, 115, 118, 124, 127, 133, 136, 142, 145, 151, 154, 160, 163, 169, 172, 178, 181, 187, 190, 196, 199, 205, 208, 214, 217, 223, 226, 232, 235, 241, 244, 250, 253, 259, 262, 268
Offset: 1

Views

Author

Bruno Berselli, Mar 21 2018

Keywords

Comments

First bisection of A056991, second bisection of A242660.
The squares of the terms of A174396 are the squares of this sequence.

Crossrefs

Cf. A274406: numbers congruent to {0, 8} mod 9.
Cf. A193910: numbers congruent to {2, 6} mod 9.

Programs

  • GAP
    a := [1,7,10];; for n in [4..60] do a[n] := a[n-1] + a[n-2] - a[n-3]; od; a;
    
  • Magma
    &cat [[9*n+1, 9*n+7]: n in [0..40]];
    
  • Mathematica
    Table[2 (2 n - 1) + (2 n - 3 (1 - (-1)^n))/4, {n, 1, 60}]
    {#+1,#+7}&/@(9*Range[0,30])//Flatten (* or *) LinearRecurrence[{1,1,-1},{1,7,10},60] (* Harvey P. Dale, Nov 08 2020 *)
  • PARI
    Vec(x*(1 + 6*x + 2*x^2) / ((1 - x)^2*(1 + x)) + O(x^60)) \\ Colin Barker, Mar 22 2018
  • Python
    [2*(2*n-1)+(2*n-3*(1-(-1)**n))/4 for n in range(1,70)]
    
  • Sage
    [n for n in (1..300) if n % 9 in (1,7)]
    

Formula

O.g.f.: x*(1 + 6*x + 2*x^2)/((1 + x)*(1 - x)^2).
E.g.f.: (3 + 8*exp(x) - 11*exp(2*x) + 18*x*exp(2*x))*exp(-x)/4.
a(n) = a(n-1) + a(n-2) - a(n-3).
a(n) = 2*(2*n - 1) + (2*n - 3*(1 - (-1)^n))/4. Therefore, for n even a(n) = (9*n - 4)/2, otherwise a(n) = (9*n - 7)/2.
a(2n+1) = A017173(n). a(2n) = A017245(n-1). - R. J. Mathar, Feb 28 2019

A371728 a(n) is the largest number that is the digit sum of an n-digit square number.

Original entry on oeis.org

9, 13, 19, 31, 40, 46, 54, 63, 70, 81, 88, 97, 106, 112, 121, 130, 136, 148, 154, 162, 171, 180, 187, 193, 205, 211, 220, 229, 235, 244, 253, 262, 271, 277, 286, 297, 301, 310, 319, 331, 334, 343, 355, 360, 367, 378, 388, 396
Offset: 1

Views

Author

Zhining Yang, Apr 04 2024

Keywords

Comments

a(n) appears to be approximately equal to (33*n-11)/4.

Examples

			a(6) = 46 because 46 is the largest digital sum encountered among all 6-digit squares (698896, 779689, 877969).
		

Crossrefs

Programs

  • Mathematica
    Array[Max@Map[Total@IntegerDigits[#^2] &, Range[Floor@Sqrt[10^(#)]], Floor@Sqrt[10^(# + 1) - 1]] &, 15]

Extensions

a(22)-a(48) from Zhao Hui Du, Apr 05 2024
a(49)-a(62) from Zhining Yang, May 08 2024
a(63)-a(64) from Zhining Yang, May 23 2024
Incorrect a(61) and unverified a(49) onward deleted by Zhining Yang, Mar 03 2025

A062685 Smallest square with digit sum n (or 0 if no such square exists).

Original entry on oeis.org

1, 0, 0, 4, 0, 0, 16, 0, 9, 64, 0, 0, 49, 0, 0, 169, 0, 576, 289, 0, 0, 1849, 0, 0, 4489, 0, 3969, 17956, 0, 0, 6889, 0, 0, 27889, 0, 69696, 98596, 0, 0, 97969, 0, 0, 499849, 0, 1887876, 698896, 0, 0, 2778889, 0, 0, 4999696, 0, 9696996, 19998784, 0, 0
Offset: 1

Views

Author

Erich Friedman, Jul 04 2001

Keywords

Comments

a(n) > 0 iff n mod 9 is 0, 1, 4, or 7. - Jon E. Schoenfield, Jul 06 2018

Examples

			16 is the smallest square with digit sum 7, so a(7)=16.
		

Crossrefs

Programs

  • Mathematica
    Array[If[FreeQ[{1, 4, 7, 9}, FixedPoint[Total@ IntegerDigits@ # &, #]], 0, Block[{k = 1, s}, While[Total@ IntegerDigits@ Set[s, k^2] != #, k++]; s]] &, 57] (* Michael De Vlieger, Jul 06 2018 *)

A072835 Exponents occurring in expansion of F_9(q^2).

Original entry on oeis.org

0, 8, 14, 18, 20, 26, 32, 36, 38, 44, 50, 54, 56, 62, 68, 72, 74, 80, 86, 90, 92, 98, 104, 108, 110, 116, 122, 126, 128, 134, 140, 144, 146, 152, 158, 162, 164, 170, 176, 180, 182, 188, 194, 198, 200, 206, 212, 216, 218, 224, 230, 234, 236, 242, 248, 252, 254, 260, 266, 270, 272, 278
Offset: 0

Views

Author

N. J. A. Sloane, Jul 25 2002

Keywords

Comments

Twice (A242660 without 1). Also, norms of vectors of the A*8 lattice. - _Andrey Zabolotskiy, Nov 10 2021

Crossrefs

Programs

  • Mathematica
    f[x_, y_]:= QPochhammer[-x, x*y]*QPochhammer[-y, x*y]*QPochhammer[x*y, x*y];
    F[9,q_]:= f[q^9, q^9]^8 - 16*q^9*f[q^9, q^27]^8 + 256*q^18*f[q^18, q^54]^8 + 18*q^8*QPochhammer[q^18]^12/QPochhammer[q^6]^4;
    cfs = CoefficientList[Series[F[9, q], {q, 0, 500}], q];
    Take[Pick[Range[Length[cfs]] - 1, Sign[Abs[cfs]], 1], 50] (* G. C. Greubel, Apr 16 2018 *)

Formula

G.f.: -2*x*(x^4-x^3-2*x^2-3*x-4) / (x^5-x^4-x+1). - Colin Barker, Jul 31 2013
a(n+4) = a(n) + 18 for n > 0. - Jerzy R Borysowicz, Sep 02 2023
a(n)/n ~ 9/2. - Jerzy R Borysowicz, Sep 03 2023
a(n) = 2 * A056991(n+1) for n>=1. - Alois P. Heinz, Sep 03 2023

Extensions

Terms a(22) onward added by G. C. Greubel, Apr 16 2018
Showing 1-10 of 20 results. Next