login
a(n) = 8*n + 7. Or, numbers whose binary expansion ends in 111.
43

%I #112 Apr 12 2024 07:50:15

%S 7,15,23,31,39,47,55,63,71,79,87,95,103,111,119,127,135,143,151,159,

%T 167,175,183,191,199,207,215,223,231,239,247,255,263,271,279,287,295,

%U 303,311,319,327,335,343,351,359,367,375,383,391,399,407,415,423,431

%N a(n) = 8*n + 7. Or, numbers whose binary expansion ends in 111.

%C These numbers cannot be expressed as the sum of 3 squares. - _Artur Jasinski_, Nov 22 2006

%C These numbers cannot be perfect squares. - _Cino Hilliard_, Sep 03 2006

%C a(n-2), n >= 2, appears in the second column of triangle A239126 related to the Collatz problem. - _Wolfdieter Lang_, Mar 14 2014

%C The initial terms 7, 15, 23, 31 are the generating set for the rest of the sequence in the sense that, by Lagrange's Four Square Theorem, any number n of the form 8*k+7 can always be written as a sum of no fewer than four squares, and if n = a^2 + b^2 + c^2 + d^2, then (a mod 4)^2 + (b mod 4)^2 + (c mod 4)^2 + (d mod 4)^2 must be one of 7, 15, 23, 31. - _Walter Kehowski_, Jul 07 2014

%C Define a set of consecutive positive odd numbers {1, 3, 5, ..., 12*n + 9} and skip the number 6*n + 5. Then the contraharmonic mean of that set gives this sequence. For example, ContraharmonicMean[{1, 3, 7, 9}] = 7. - _Hilko Koning_, Aug 27 2018

%C Jacobi symbol (2, a(n)) = Kronecker symbol (a(n), 2) = 1. - _Jianing Song_, Aug 28 2018

%H Vincenzo Librandi, <a href="/A004771/b004771.txt">Table of n, a(n) for n = 0..5000</a>

%H Tanya Khovanova, <a href="http://www.tanyakhovanova.com/RecursiveSequences/RecursiveSequences.html">Recursive Sequences</a>

%H Leo Tavares, <a href="/A004771/a004771_1.jpg">Illustration: Twin Square Frames</a>

%H Leo Tavares, <a href="/A004771/a004771_2.jpg">Illustration: Mid-line Hexagons</a>

%H INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=962">Encyclopedia of Combinatorial Structures 962</a>

%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (2,-1).

%F O.g.f: (7 + x)/(1 - x)^2 = 8/(1 - x)^2 - 1/(1 - x). - _R. J. Mathar_, Nov 30 2007

%F a(n) = 2*a(n-1) - a(n-2) for n >= 2. - _Vincenzo Librandi_, May 28 2011

%F A056753(a(n)) = 7. - _Reinhard Zumkeller_, Aug 23 2009

%F a(n) = t(t(t(n))), where t(i) = 2*i + 1.

%F a(n) = A004767(2*n+1), for n >= 0. See also A004767(2*n) = A017101(n). - _Wolfdieter Lang_, Feb 03 2022

%F From _Elmo R. Oliveira_, Apr 11 2024: (Start)

%F E.g.f.: exp(x)*(7 + 8*x).

%F a(n) = A033954(n+1) - A033954(n). (End)

%p A004771:=n->8*n+7; seq(A004771(n), n=0..100); # _Wesley Ivan Hurt_, Dec 22 2013

%t 8 Range[0, 60] + 7 (* or *) Range[7, 500, 8] (* or *) Table[8 n + 7, {n, 0, 60}] (* _Bruno Berselli_, Dec 28 2016 *)

%o (Magma) [8*n+7: n in [0..60]]; // _Vincenzo Librandi_, May 28 2011

%o (PARI) a(n)=8*n+7 \\ _Charles R Greathouse IV_, Sep 23 2012

%o (Haskell)

%o a004771 = (+ 7) . (* 8)

%o a004771_list = [7, 15 ..] -- _Reinhard Zumkeller_, Jan 29 2013

%o (GAP) List([0..60],n->8*n+7); # _Muniru A Asiru_, Aug 28 2018

%Y Cf. A004767, A008590, A017077, A017101, A017137, A033954.

%Y Cf. A007522 (primes), subsequence of A047522.

%Y Cf. A056753, A227144, A227146, A239126.

%K nonn,easy

%O 0,1

%A _N. J. A. Sloane_