login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A240924
Digital root of squares of numbers not divisible by 2, 3 or 5.
2
1, 4, 4, 7, 1, 1, 7, 4, 7, 1, 7, 4, 4, 7, 1, 7, 4, 7, 1, 1, 7, 4, 4, 1, 1, 4, 4, 7, 1, 1, 7, 4, 7, 1, 7, 4, 4, 7, 1, 7, 4, 7, 1, 1, 7, 4, 4, 1, 1, 4, 4, 7, 1, 1, 7, 4, 7, 1, 7, 4, 4, 7, 1, 7, 4, 7, 1, 1, 7, 4, 4, 1
OFFSET
1,2
COMMENTS
This period 24 repeating sequence is palindromic.
LINKS
Index entries for linear recurrences with constant coefficients, signature (2,-1,-1,2,-1,-1,2,-2,1,1,-2,1,1,-2,1).
FORMULA
From Colin Barker, Sep 21 2019: (Start)
G.f.: x*(1 + x)^2*(1 - 4*x^2 + 12*x^3 - 27*x^4 + 45*x^5 - 53*x^6 + 45*x^7 - 27*x^8 + 12*x^9 - 4*x^10 + x^12) / ((1 - x)*(1 - x + x^2)*(1 - x^2 + x^4)*(1 - x^4 + x^8)).
a(n) = 2*a(n-1) - a(n-2) - a(n-3) + 2*a(n-4) - a(n-5) - a(n-6) + 2*a(n-7) - 2*a(n-8) + a(n-9) + a(n-10) - 2*a(n-11) + a(n-12) + a(n-13) - 2*a(n-14) + a(n-15) for n>15.
(End)
EXAMPLE
The first 8 numbers not divisible by 2, 3 or 5 are 1,7,11,13,17,19,23,29; with squares 1,49,121,169,289,361,529,841 and digital root sequence of 1,4,4,7,1,1,7,4.
PROG
(Python)
A240924 = [1 + (n*n-1) % 9 for n in range(1, 10**3, 2) if n % 3 and n % 5 ]
# Chai Wah Wu, Sep 03 2014
(PARI) Vec(x*(1 + x)^2*(1 - 4*x^2 + 12*x^3 - 27*x^4 + 45*x^5 - 53*x^6 + 45*x^7 - 27*x^8 + 12*x^9 - 4*x^10 + x^12) / ((1 - x)*(1 - x + x^2)*(1 - x^2 + x^4)*(1 - x^4 + x^8)) + O(x^100)) \\ Colin Barker, Sep 21 2019
CROSSREFS
Sequence in context: A356686 A198138 A300709 * A319034 A282468 A196463
KEYWORD
nonn,base,easy
AUTHOR
Gary Croft, Aug 15 2014
STATUS
approved