

A004771


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


30



7, 15, 23, 31, 39, 47, 55, 63, 71, 79, 87, 95, 103, 111, 119, 127, 135, 143, 151, 159, 167, 175, 183, 191, 199, 207, 215, 223, 231, 239, 247, 255, 263, 271, 279, 287, 295, 303, 311, 319, 327, 335, 343, 351, 359, 367, 375, 383, 391, 399, 407, 415, 423, 431
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,1


COMMENTS

These numbers cannot be expressed as the sum of 3 squares.  Artur Jasinski, Nov 22 2006
These numbers cannot be perfect squares. [Proof. Assume x^2 = 8*k + 7. Then x is odd of the form 2*m + 1. So (2*m + 1)^2  7 = 8*k, 4*m^2 + 4*m  6 = 8*k, 2*m^2 + 2*m  3 = 4*k or odd = even a contradiction. So the assumption that x^2 = 8*k + 7 is false.  Cino Hilliard, Sep 03 2006
a(n) is the set of numbers congruent to {7, 15, 23} mod 24.  Gary Detlefs, Mar 07 2010
a(n2), n >= 2, appears in the second column of triangle A239126 related to the Collatz problem.  Wolfdieter Lang, Mar 14 2014
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
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, ContraharmonicMean[{1, 3, 5, 7, 9, 13, 15, 17, 19, 21}] = 15, ContraharmonicMean[{1, 3, 5, 7, 9, 11, 13, 15, 19, 21, 23, 25, 27, 29, 31, 33}] = 23.  Hilko Koning, Aug 27 2018
Jacobi symbol (2, a(n)) = Kronecker symbol (a(n), 2) = 1.  Jianing Song, Aug 28 2018


LINKS

Vincenzo Librandi, Table of n, a(n) for n = 0..5000
Tanya Khovanova, Recursive Sequences
INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 962
Index entries for linear recurrences with constant coefficients, signature (2,1).


FORMULA

O.g.f: (7 + x)/(1  x)^2 = 8/(1  x)^2  1/(1  x).  R. J. Mathar, Nov 30 2007
a(n) = floor((24*n  2)/3) with offset 1, a(1) = 7.  Gary Detlefs, Mar 07 2010
a(n) = 2*a(n1)  a(n2) for n > 1, a(0) = 7, a(1) = 15.  Vincenzo Librandi, May 28 2011
A056753(a(n)) = 7.  Reinhard Zumkeller, Aug 23 2009
a(n) = t(t(t(n))), where t(i) = 2*i + 1.


MAPLE

A004771:=n>8*n+7; seq(A004771(n), n=0..100); # Wesley Ivan Hurt, Dec 22 2013


MATHEMATICA

8 Range[0, 60] + 7 (* or *) Range[7, 500, 8] (* or *) Table[8 n + 7, {n, 0, 60}] (* Bruno Berselli, Dec 28 2016 *)


PROG

(MAGMA) [8*n+7: n in [0..60]]; // Vincenzo Librandi, May 28 2011
(PARI) a(n)=8*n+7 \\ Charles R Greathouse IV, Sep 23 2012
(Haskell)
a004771 = (+ 7) . (* 8)
a004771_list = [7, 15 ..]  Reinhard Zumkeller, Jan 29 2013
(GAP) List([0..60], n>8*n+7); # Muniru A Asiru, Aug 28 2018


CROSSREFS

Cf. A008590, A017077, A017137.
Cf. A007522 (primes), subsequence of A047522.
Cf. A227144, A227146.
Sequence in context: A059562 A017149 A133655 * A029724 A194400 A177768
Adjacent sequences: A004768 A004769 A004770 * A004772 A004773 A004774


KEYWORD

nonn,easy


AUTHOR

N. J. A. Sloane


STATUS

approved



