A247004 Denominator of (n+4)/gcd(n, 4)^2, a 16-periodic sequence that associates A061037 with A106617.
4, 1, 2, 1, 2, 1, 2, 1, 4, 1, 2, 1, 1, 1, 2, 1, 4, 1, 2, 1, 2, 1, 2, 1, 4, 1, 2, 1, 1, 1, 2, 1, 4, 1, 2, 1, 2, 1, 2, 1, 4, 1, 2, 1, 1, 1, 2, 1, 4, 1, 2, 1, 2, 1, 2, 1, 4, 1, 2, 1, 1, 1, 2, 1, 4, 1, 2, 1, 2, 1, 2, 1, 4, 1, 2, 1, 1, 1, 2, 1, 4, 1, 2, 1, 2, 1, 2, 1, 4, 1, 2, 1, 1, 1, 2, 1, 4, 1, 2, 1, 2
Offset: 0
Examples
Fractions begin: 1/4, 5, 3/2, 7, 1/2, 9, 5/2, 11, 3/4, 13, 7/2, 15, 1, 17, 9/2, 19, 5/4, 21, 11/2, 23, 3/2, 25, 13/2, 27, 7/4, 29, 15/2, 31, 2, 33, 17/2, 35, ... Numerators begin: 1, 5, 3, 7, 1, 9, 5, 11, 3, 13, 7, 15, 1, 17, 9, 19, 5, 21, 11, 23, 3, 25, 13, 27, 7, 29, 15, 31, 2, 33, 17, 35, ... Periodic part = [4, 1, 2, 1, 2, 1, 2, 1, 4, 1, 2, 1, 1, 1, 2, 1];
Links
- Antti Karttunen, Table of n, a(n) for n = 0..65537
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1).
Programs
-
Magma
[Denominator((n+4)/Gcd(n,4)^2): n in [0..100]]; // G. C. Greubel, Aug 05 2018
-
Mathematica
a[n_] := (n+4)/GCD[n, 4]^2 // Denominator; Table[a[n], {n, 0, 100}] (* or: *) Table[{1, 2, 1, 2, 1, 2, 1, 4, 1, 2, 1, 1, 1, 2, 1, 4}[[Mod[n, 16, 1]]], {n, 0, 100}]
-
PARI
for(n=0,100, print1(denominator((n+4)/gcd(n,4)^2), ", ")) \\ G. C. Greubel, Aug 05 2018
Formula
(n+4) / gcd(n, 4)^2 = A188134(n+4) / 4. - Michael Somos, Sep 12 2014
a(n) = a(n+16) = a(-n), a(2*n + 1) = 1 for all n in Z. - Michael Somos, Sep 13 2014
Comments