OFFSET
1,1
COMMENTS
Numbers k for which Jacobi symbol J(2,k) = -1, so 2 (as well as 2^k) is not a square mod k. - Antti Karttunen, Aug 27 2005, corrected by Jianing Song, Nov 05 2019, see also A329095.
Numbers n whose multiplicative order modulo 2^k is 2^(k - 2) for k >= 4. For k = 3, the numbers whose multiplicative order modulo 8 is 2 are in sequence A047484. - Jianing Song, Apr 29 2018
LINKS
Muniru A Asiru, Table of n, a(n) for n = 1..5000
Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
FORMULA
a(n) = 8*n - a(n-1) - 8 (with a(1) = 3). - Vincenzo Librandi, Aug 06 2010
G.f.: x*(3 + 2*x + 3*x^2) / ( (1 + x)*(x - 1)^2 ). - R. J. Mathar, Oct 08 2011
A089911(3*a(n)) = 10. - Reinhard Zumkeller, Jul 05 2013
a(n) = 8*floor((n - 1)/2) + 4 + (-1)^n. - Gary Detlefs, Dec 03 2018
From Franck Maminirina Ramaharo, Dec 03 2018: (Start)
a(n) = 4*n - 2 - (-1)^n.
E.g.f.: 3 - (2 - 4*x)*exp(x) - exp(-x). (End)
a(n + 2) = a(n) + 8. - David A. Corneth, Dec 03 2018
Sum_{n>=1} (-1)^(n+1)/a(n) = (sqrt(2)-1)*Pi/8. - Amiram Eldar, Dec 11 2021
From Amiram Eldar, Nov 22 2024: (Start)
Product_{n>=1} (1 - (-1)^n/a(n)) = sec(Pi/8) (1/A144981).
Product_{n>=1} (1 + (-1)^n/a(n)) = 2*sin(Pi/8) (A101464). (End)
MATHEMATICA
LinearRecurrence[{1, 1, -1}, {3, 5, 11}, 100] (* Jean-François Alcover, Jul 31 2018 *)
PROG
(Haskell)
a047621 n = a047621_list !! (n-1)
a047621_list = 3 : 5 : map (+ 8) a047621_list
-- Reinhard Zumkeller, Jul 05 2013
(GAP) a:=[3];; for n in [2..60] do a[n]:=8*n-a[n-1]-8; od; a; # Muniru A Asiru, Dec 04 2018
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
STATUS
approved