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.

Previous Showing 11-17 of 17 results.

A251754 Digital root of A027444(n) = n + n^2 + n^3, n>=1. Repeat(3, 5, 3, 3, 2, 6, 3, 8, 9).

Original entry on oeis.org

3, 5, 3, 3, 2, 6, 3, 8, 9, 3, 5, 3, 3, 2, 6, 3, 8, 9, 3, 5, 3, 3, 2, 6, 3, 8, 9, 3, 5, 3, 3, 2, 6, 3, 8, 9, 3, 5, 3, 3, 2, 6, 3, 8, 9, 3, 5, 3, 3, 2, 6, 3, 8, 9, 3, 5, 3, 3, 2, 6, 3, 8, 9, 3, 5, 3, 3, 2, 6, 3, 8, 9, 3, 5, 3, 3, 2, 6, 3, 8, 9, 3, 5, 3, 3, 2, 6, 3, 8, 9, 3, 5, 3, 3, 2, 6, 3, 8, 9, 3
Offset: 1

Views

Author

Peter M. Chema, Dec 07 2014

Keywords

Comments

Periodic with cycle of length 9: {3, 5, 3, 3, 2, 6, 3, 8, 9}.
a(n) also arises from the decimal expansion of 117775463/333333333 = 0.repeat(353326389).

Examples

			For a(11) = 5 because 11+11^2+11^3 = 1463, and 1+4+6+3 = 14.  Result is 5, which is the digital root of 14.
		

Crossrefs

Programs

Formula

a(n) = sum of digits of (n+n^2+n^3), reduced to digital root.
a(n) = A010888(A027444(n)), and sequence may start at n=0.
a(n) = A010888(A010888(n) + A056992(n) + A073636(n)).
G.f.: x*(9*x^8 + 8*x^7 + 3*x^6 + 6*x^5 + 2*x^4 + 3*x^3 + 3*x^2 + 5*x + 3)/(1 - x^9). - Chai Wah Wu, Jul 17 2016

Extensions

Edited: name specified, digital root link added, a comment rewritten and moved to formula section. - Wolfdieter Lang, Jan 05 2015

A251755 Digital root of n + n^2.

Original entry on oeis.org

0, 2, 6, 3, 2, 3, 6, 2, 9, 9, 2, 6, 3, 2, 3, 6, 2, 9, 9, 2, 6, 3, 2, 3, 6, 2, 9, 9, 2, 6, 3, 2, 3, 6, 2, 9, 9, 2, 6, 3, 2, 3, 6, 2, 9, 9, 2, 6, 3, 2, 3, 6, 2, 9, 9, 2, 6, 3, 2, 3, 6, 2, 9, 9, 2, 6, 3, 2, 3, 6, 2, 9, 9, 2, 6, 3, 2, 3, 6, 2, 9, 9, 2, 6, 3, 2, 3, 6, 2, 9, 9, 2, 6, 3, 2, 3, 6, 2, 9, 9, 2, 6, 3, 2, 3
Offset: 0

Views

Author

Peter M. Chema, Dec 07 2014

Keywords

Comments

Positive integers give a cycle of period 9: {2, 6, 3, 2, 3, 6, 2, 9, 9}, which may be expressed as a decimal expansion of 87745433/333333333. Note that a(-n)=a(n-1), and negative integers give a mirrored period cycle, generating the cycle in reverse. Sequence is palindromic.
a(n) equals the digital root sum of A010888 and A056992.

Examples

			For a(7) = 2 because 7+7^2 = 56, and 5+6 = 11, yielding result of digital root of 2 (1+1).
For a(-3) = 6 because -3+(-3)^2 = -6, with digital root of 6.
		

Crossrefs

Programs

  • Mathematica
    a251755[n_Integer] := Module[{f},
      f[x_] := Last@NestWhileList[Plus @@ IntegerDigits[#] &, x, # > 9 &];
    f /@ Table[i + i^2, {i, 0, n}]]; a251755[60] (* Michael De Vlieger, Dec 17 2014 *)
  • PARI
    DR(n)=s=sumdigits(n);while(s>9,s=sumdigits(s));s
    for(n=0,100,print1(DR(abs(n+n^2)),", ")) \\ Derek Orr, Dec 30 2014

Formula

a(n) = A010888(A002378(n)).

A251780 Digital root of A069778(n-1) = n^3 - n^2 + 1, n >= 1. Repeat(1, 6, 3, 7, 6, 6, 4, 6, 9).

Original entry on oeis.org

1, 6, 3, 7, 6, 6, 4, 6, 9, 1, 6, 3, 7, 6, 6, 4, 6, 9, 1, 6, 3, 7, 6, 6, 4, 6, 9, 1, 6, 3, 7, 6, 6, 4, 6, 9, 1, 6, 3, 7, 6, 6, 4, 6, 9, 1, 6, 3, 7, 6, 6, 4, 6, 9, 1, 6, 3, 7, 6, 6, 4, 6, 9, 1, 6, 3, 7, 6, 6, 4, 6, 9, 1, 6, 3, 7, 6, 6, 4, 6, 9, 1, 6, 3, 7, 6, 6, 4, 6, 9, 1, 6, 3, 7, 6, 6, 4, 6, 9, 1, 6, 3, 7, 6, 6, 4, 6, 9
Offset: 1

Views

Author

Peter M. Chema, Dec 08 2014

Keywords

Comments

Periodic with cycle of 9: {1, 6, 3, 7, 6, 6, 4, 6, 9}.
The decimal expansion of 54588823/333333333 = 0.repeat(163766469).

Examples

			For a(3) = 3 because 3^3 - 3^2 + 3  = 27 - 9 + 3 = 21 with digit sum 3 which is also the digital root of 21.
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{0, 0, 0, 0, 0, 0, 0, 0, 1},{1, 6, 3, 7, 6, 6, 4, 6, 9},108] (* Ray Chandler, Jul 25 2016 *)
  • PARI
    DR(n)=s=sumdigits(n);while(s>9,s=sumdigits(s));s
    for(n=1,100,print1(DR(abs(n^2-n-n^3)),", ")) \\ Derek Orr, Dec 30 2014

Formula

a(n) = digital root of n^3 - n^2 + n.

Extensions

More terms from Derek Orr, Dec 30 2014
Edited: name changed; formula, comment and example rewritten; digital root link added. - Wolfdieter Lang, Jan 05 2015

A303296 Digital roots of fourth powers A000583.

Original entry on oeis.org

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

Views

Author

Gaston Maire and students, Apr 21 2018

Keywords

Comments

This sequence is related to A056992, the digital roots of the squares, and also presents a period of 9, in this case repeat [1, 7, 9, 4, 4, 9, 7, 1, 9].
a(n) = 9 if n is a multiple of 3.
Replace 4 with 7 and 7 with 4 in A056992. - Omar E. Pol, Apr 21 2018
a(n) is also the decimal expansion of 598165730/333333333. - Enrique Pérez Herrero, Nov 13 2021

Crossrefs

Programs

  • Mathematica
    Table[FixedPoint[Total[IntegerDigits[#]] &, n^4], {n, 90}]
  • PARI
    a(n) = (n^4-1)%9+1; \\ Michel Marcus, Apr 22 2018

Formula

a(n) = A010888(A000583(n)) = a(n - 9).

A073637 Digital root (cf. A010888) of prime(n)^3.

Original entry on oeis.org

8, 9, 8, 1, 8, 1, 8, 1, 8, 8, 1, 1, 8, 1, 8, 8, 8, 1, 1, 8, 1, 1, 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, 8, 1, 8, 1, 1, 1, 8, 8, 8, 1, 8, 1, 8, 1, 1, 1, 8, 1, 8, 8, 1, 8, 8, 8, 8, 1, 1, 8, 1, 8, 1, 8, 1, 8, 1, 1, 8, 1, 8, 8, 1, 1, 1, 8, 8, 1, 8, 1, 8, 1, 8, 1, 1, 8, 8, 1, 8, 1, 8, 8, 1, 8, 1, 8, 8, 8, 1, 1
Offset: 1

Views

Author

Zak Seidov, Sep 01 2002, Oct 23 2009

Keywords

Comments

Apart from a(2)=9 all other terms are either 1 or 8.

Examples

			a(3)=8 because p(3)=5 and 5^3=125 -> sum-of-digits = 8. a(4)=1 because p(3)=7 and 7^3=343 -> sum-of-digits = 10 -> sum-of-digits = 1.
		

Crossrefs

Programs

  • Mathematica
    n=3; su[x_] := Sum[IntegerDigits[x][[i]], {i, Length[IntegerDigits[x]]}]; Table[su[su[su[su[Prime[x]^n]]]], {x, 100}]
    Table[If[(m9=Mod[Prime[n]^3,9])==0,9,m9],{n,200}]

Extensions

Edited by N. J. A. Sloane, Oct 29 2009

A340536 Digital root of 2*n^2.

Original entry on oeis.org

2, 8, 9, 5, 5, 9, 8, 2, 9, 2, 8, 9, 5, 5, 9, 8, 2, 9, 2, 8, 9, 5, 5, 9, 8, 2, 9, 2, 8, 9, 5, 5, 9, 8, 2, 9, 2, 8, 9, 5, 5, 9, 8, 2, 9, 2, 8, 9, 5, 5, 9, 8, 2, 9, 2, 8, 9, 5, 5, 9, 8, 2, 9, 2, 8, 9, 5, 5, 9, 8, 2, 9, 2, 8, 9, 5, 5, 9, 8, 2, 9, 2, 8, 9, 5, 5, 9, 8, 2, 9
Offset: 1

Views

Author

Radaev Nikita, Jan 10 2021

Keywords

Comments

Period 9: repeat [2, 8, 9, 5, 5, 9, 8, 2, 9].
This sequence is also right if digital root of factor in "2*n^2" is 2 (for example, "11*n^2", "20*n^2", "29*n^2", etc.)

Examples

			For n=5, 2*5^2 = 50 and digital root is 5, so a(5) = 5.
		

Crossrefs

Programs

Formula

a(n) = A010888(A001105(n)).

A375166 Nonsquares congruent to {0, 1, 4, 7} modulo 9.

Original entry on oeis.org

7, 10, 13, 18, 19, 22, 27, 28, 31, 34, 37, 40, 43, 45, 46, 52, 54, 55, 58, 61, 63, 67, 70, 72, 73, 76, 79, 82, 85, 88, 90, 91, 94, 97, 99, 103, 106, 108, 109, 112, 115, 117, 118, 124, 126, 127, 130, 133, 135, 136, 139, 142, 145, 148, 151, 153, 154, 157, 160, 162
Offset: 1

Views

Author

Stefano Spezia, Aug 05 2024

Keywords

Comments

Squares are congruent to {0, 1, 4, 7} modulo 9, but the reverse is not always true since there are nonsquares that have the same congruence property. See Beiler.

References

  • Albert H. Beiler, Recreations in the theory of numbers, New York, Dover, (2nd ed.) 1966. See p. 140.

Crossrefs

Intersection of A000037 and A056991.

Programs

  • Mathematica
    Select[Range[0,162], !IntegerQ[Sqrt[#]] && MemberQ[{0,1,4,7}, Mod[#,9]] &]
  • Python
    from itertools import count, islice
    from sympy.ntheory.primetest import is_square
    def A375166_gen(): # generator of terms
        for i in count(0,9):
            for j in (0,1,4,7):
                if not is_square(i+j): yield i+j
    A375166_list = list(islice(A375166_gen(),40)) # Chai Wah Wu, Jun 05 2025
Previous Showing 11-17 of 17 results.