cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 30 results. Next

A347840 A surjective map of the positive numbers congruent to 5 modulo 8 (A004770) to the positive numbers congruent to 1, 3, or 7 modulo 8 (A047529).

Original entry on oeis.org

1, 3, 1, 7, 9, 11, 3, 15, 17, 19, 1, 23, 25, 27, 7, 31, 33, 35, 9, 39, 41, 43, 11, 47, 49, 51, 3, 55, 57, 59, 15, 63, 65, 67, 17, 71, 73, 75, 19, 79, 81, 83, 1, 87, 89, 91, 23, 95, 97, 99, 25, 103, 105, 107, 27, 111, 113, 115, 7, 119, 121
Offset: 1

Views

Author

Wolfdieter Lang, Oct 30 2021

Keywords

Comments

This map is obtained from the array A(k, m) given in A347834. There all positive numbers congruent to 5 modulo 8 (A004770) appear uniquely in the columns for m >= 1, and the m = 0 column gives all numbers congruent to {1, 3, 7} (mod 8) (A047529). The surjective map is f: A004770 -> A047529, with b(n) = A004770(n) -> f(b(n)) = a(n).
See also the array A178415 which has permuted rows.
This maps all entries of each row k of the array A(k, m), given in A347834, with columns m >= 1 to the entry A(k, 0) = A047529(k), for k >= 1. The numbers b(n) appear once in the array A for columns m >= 1. Column A(k, 1) = A347836(k) gives the numbers congruent to {5, 32, 29} (mod 32), and each entry for columns m >= 2 is congruent to 21 (mod 32).
The surjective map of the numbers b(n) = 5 + 8*(n-1) = A004770(n), for n >= 1, to A047529 with element a(n), is computed by switching to the companion array A347839 of A347834, with the simple recurrence, removing all factors of 4, and then going back to array A347834. See the formula below. Thanks to Antti Karttunen for motivating me to simplify the prescription, and to add in A347834 the hint for the induction proof that all 5 (mod 8) numbers appear once in the columns n >= 1.
This map f is of interest in the context of the Collatz 3*n+1 conjecture. The (modified) rooted tree with only odd labeled nodes has for each row k of the array A(k, m) (A347834) the same precursor (or (modified) Collatz map given in A075677(n+1), for 2*n+1). Therefore, all nodes with labels b(n) == 5 (mod 8) can be represented by a(n). This leads to a further restricted Collatz tree with only node labels congruent to {1, 3, 7} (mod 8) (A047529).
An even further restricted Collatz tree has only node labels congruent to 1 (mod 8) (A017077), as any positive integer can be written as m*2^(v+1)+2^v-1 or (m,v) where v is the number of trailing 1-bits in binary, and for v > 1 the next odd Collatz successor of (m,v) is (3*m+1,v-1). - Ruud H.G. van Tol, Sep 13 2023

Examples

			The sequence a(n) begins: (b(n) = A004770(n))
-------------------------------------------------------------------------
n:     1  2  3  4  5  6  7  8  9 10 11 12  13  14  15  16  17  18  19  20
b(n):  5 13 21 29 37 45 53 61 69 77 85 93 101 109 117 125 133 141 149 157
a(n):  1  3  1  7  9 11  3 15 17 19  1 23  25  27   7  31  35  35   9  39
-------------------------------------------------------------------------
n:     21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  36  37 ...
b(n): 165 173 181 189 197 205 213 221 229 237 245 253 261 269 277 285 293 ...
a(n):  41  43  11  47  49  51   3  55  57  59  15  63  65  67  17  71  73 ...
-----------------------------------------------------------------------------
n = 6, b(6) = 45 = 13 + 32*1, case a), a(6) = 3 + 8*1 = 11.
n = 7, b(7) = 53 = 21 + 32*1, case b)1), first instance, L(7) = 0, a(7) = 3 + 8*0 = 3.
n = 31, b(31) = 245 = 117 + 128*1, case b)1), second instance, L(31) = 1, a(31) = 7 + 8*1 = 15.
n = 11, b(11) = 85 = 21 + 64*1, A065883(1 + 3*1) = 1, c(11) = 1, case b)2)i), a(11) = 85 = A347834(1, 3).
n = 19, b(19) = 149 = 21 + 64*2, A065883(1 + 3*2) = 7, c(19) = (7 - 1)/3 = 2, case b)2)ii), a(n) = 4*2 + 1 = 9.
		

Crossrefs

Programs

  • Mathematica
    A347840[n_] := NestWhile[Quotient[#, 4] &, 2*n - 1, Mod[#, 8] == 5 &];
    Array[A347840, 100] (* Paolo Xausa, Jun 25 2025 *)
  • PARI
    a(n) = n=2*n-1; while(5==n%8, n>>=2); n; \\ Ruud H.G. van Tol, Sep 13 2023
    
  • PARI
    a(n) = (2*n-1)>>(valuation(3*n-1,2)\2*2); \\ Ruud H.G. van Tol, Sep 20 2023

Formula

a(n) = (2*A065883((3*b(n)+1)/2) - 1)/3, with b(n) = A004770(n), for n >= 1.
a(n) = A385109(8*(n-1)+5). - Ralf Stephan, Jun 18 2025

A007742 a(n) = n*(4*n+1).

Original entry on oeis.org

0, 5, 18, 39, 68, 105, 150, 203, 264, 333, 410, 495, 588, 689, 798, 915, 1040, 1173, 1314, 1463, 1620, 1785, 1958, 2139, 2328, 2525, 2730, 2943, 3164, 3393, 3630, 3875, 4128, 4389, 4658, 4935, 5220, 5513, 5814, 6123, 6440, 6765, 7098, 7439, 7788, 8145
Offset: 0

Views

Author

Keywords

Comments

Write 0,1,2,... in a clockwise spiral; sequence gives the numbers that fall on the positive y-axis. (See Example section.)
Central terms of the triangle in A126890. - Reinhard Zumkeller, Dec 30 2006
a(n)*Pi is the total length of 4 points circle center spiral after n rotations. The spiral length at each rotation (L(n)) is A004770. The spiral length ratio rounded down [floor(L(n)/L(1))] is A047497. See illustration in links. - Kival Ngaokrajang, Dec 27 2013
For n >= 1, the continued fraction expansion of sqrt(a(n)) is [2n; {4, 4n}]. For n=1, this collapses to [2, {4}]. - Magus K. Chu, Sep 15 2022

Examples

			Part of the spiral:
.
  64--65--66--67--68
   |
  63  36--37--38--39--40--41--42
   |   |                       |
  62  35  16--17--18--19--20  43
   |   |   |               |   |
  61  34  15   4---5---6  21  44
   |   |   |   |       |   |   |
  60  33  14   3   0   7  22  45
   |   |   |   |   |   |   |   |
  59  32  13   2---1   8  23  46
   |   |   |           |   |   |
  58  31  12--11--10---9  24  47
   |   |                   |   |
  57  30--29--28--27--26--25  48
   |                           |
  56--55--54--53--52--51--50--49
		

References

  • S. M. Ellerstein, The square spiral, J. Recreational Mathematics 29 (#3, 1998) 188; 30 (#4, 1999-2000), 246-250.
  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 2nd ed., 1994, p. 99.

Crossrefs

Sequences on the four axes of the square spiral: Starting at 0: A001107, A033991, A007742, A033954; starting at 1: A054552, A054556, A054567, A033951.
Sequences on the four diagonals of the square spiral: Starting at 0: A002939 = 2*A000384, A016742 = 4*A000290, A002943 = 2*A014105, A033996 = 8*A000217; starting at 1: A054554, A053755, A054569, A016754.
Sequences obtained by reading alternate terms on the X and Y axes and the two main diagonals of the square spiral: Starting at 0: A035608, A156859, A002378 = 2*A000217, A137932 = 4*A002620; starting at 1: A317186, A267682, A002061, A080335.
Cf. index to sequences with numbers of the form n*(d*n+10-d)/2 in A140090.
Cf. A081266.

Programs

  • Magma
    I:=[0, 5, 18]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+1*Self(n-3): n in [1..50]]; // Vincenzo Librandi, Jan 29 2012
  • Mathematica
    LinearRecurrence[{3,-3,1},{0,5,18},50] (* Vincenzo Librandi, Jan 29 2012 *)
    Table[n(4n+1),{n,0,50}] (* Harvey P. Dale, Aug 10 2017 *)
  • PARI
    a(n)=4*n^2+n
    

Formula

G.f.: x*(5+3*x)/(1-x)^3. - Michael Somos, Mar 03 2003
a(n) = A033991(-n) = A074378(2*n).
a(n) = floor((n + 1/4)^2). - Reinhard Zumkeller, Feb 20 2010
a(n) = A110654(n) + A173511(n) = A002943(n) - n. - Reinhard Zumkeller, Feb 20 2010
a(n) = 8*n + a(n-1) - 3. - Vincenzo Librandi, Nov 21 2010
Sum_{n>=1} 1/a(n) = Sum_{k>=0} (-1)^k*zeta(2+k)/4^(k+1) = 0.349762131... . - R. J. Mathar, Jul 10 2012
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n>2, a(0)=0, a(1)=5, a(2)=18. - Philippe Deléham, Mar 26 2013
a(n) = A118729(8n+4). - Philippe Deléham, Mar 26 2013
a(n) = A000217(3*n) - A000217(n). - Bruno Berselli, Sep 21 2016
E.g.f.: (4*x^2 + 5*x)*exp(x). - G. C. Greubel, Jul 17 2017
From Amiram Eldar, Jul 03 2020: (Start)
Sum_{n>=1} 1/a(n) = 4 - Pi/2 - 3*log(2).
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/sqrt(2) + log(2) + sqrt(2)*log(1 + sqrt(2)) - 4. (End)
a(n) = A081266(n) - A000217(n). - Leo Tavares, Mar 25 2022

A007521 Primes of the form 8k + 5.

Original entry on oeis.org

5, 13, 29, 37, 53, 61, 101, 109, 149, 157, 173, 181, 197, 229, 269, 277, 293, 317, 349, 373, 389, 397, 421, 461, 509, 541, 557, 613, 653, 661, 677, 701, 709, 733, 757, 773, 797, 821, 829, 853, 877, 941, 997, 1013, 1021, 1061, 1069, 1093, 1109, 1117, 1181, 1213
Offset: 1

Views

Author

Keywords

Comments

Primes of the form 4x^2 - 4xy + 5y^2 with x and y nonnegative. - T. D. Noe, May 08 2005
Prime numbers 2k+1 with k even such that 2k+1 | 2^k+1. - Hilko Koning, Jan 21 2022

References

  • Milton Abramowitz and Irene A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A010051.
Subsequence of A004770; see also A045323.

Programs

  • Haskell
    a007521 n = a007521_list !! (n-1)
    a007521_list = filter ((== 1). a010051) a004770_list
    -- Reinhard Zumkeller, Aug 17 2012
    
  • Magma
    [p: p in PrimesUpTo(2000) | p mod 8 eq 5]; // Vincenzo Librandi, Jun 26 2014
    
  • Mathematica
    Select[8Range[0, 160] + 5, PrimeQ]  (* Harvey P. Dale, Apr 22 2011 *)
  • PARI
    list(lim)=select(n->n%8==5,primes(primepi(lim))) \\ Charles R Greathouse IV, Jul 25 2011
    
  • Python
    from sympy import isprime
    print(list(filter(isprime, range(5, 1214, 8)))) # Michael S. Branicky, May 13 2021

A078370 a(n) = 4*(n+1)*n + 5.

Original entry on oeis.org

5, 13, 29, 53, 85, 125, 173, 229, 293, 365, 445, 533, 629, 733, 845, 965, 1093, 1229, 1373, 1525, 1685, 1853, 2029, 2213, 2405, 2605, 2813, 3029, 3253, 3485, 3725, 3973, 4229, 4493, 4765, 5045, 5333, 5629, 5933, 6245, 6565, 6893, 7229, 7573, 7925, 8285, 8653, 9029
Offset: 0

Views

Author

Wolfdieter Lang, Nov 29 2002

Keywords

Comments

This is the generic form of D in the (nontrivially) solvable Pell equation x^2 - D*y^2 = -4. See A078356, A078357.
1/5 + 1/13 + 1/29 + ... = (Pi/8)*tanh Pi [Jolley]. - Gary W. Adamson, Dec 21 2006
Appears in A054413 and A086902 in relation to sequences related to the numerators and denominators of continued fractions convergents to sqrt((2*n+1)^2 + 4), n = 1, 2, 3, ... . - Johannes W. Meijer, Jun 12 2010
(2*n + 1 + sqrt(a(n)))/2 = [2*n + 1; 2*n + 1, 2*n + 1, ...], n >= 0, with the regular continued fraction with period length 1. This is the odd case. See A087475 for the general case with the Schroeder reference and comments. For the even case see A002522.
Primes in the sequence are in A005473. - Russ Cox, Aug 26 2019
The continued fraction expansion of sqrt(a(n)) is [2n+1; {n, 1, 1, n, 4n+2}]. For n=0, this collapses to [2; {4}]. - Magus K. Chu, Aug 27 2022
Discriminant of the binary quadratic forms y^2 - x*y - A002061(n+1)*x^2. - Klaus Purath, Nov 10 2022
From Klaus Purath, Apr 08 2025: (Start)
There are no squares in this sequence. The prime factors of these terms are always of the form 4*k + 1.
All a(n) = D satisfy the Pell equation (k*x)^2 - D*(m*y)^2 = -1 for any integer n where m = (D - 3)/2. The values for k and the solutions x, y can be calculated using the following algorithm: k = sqrt(D*m^2 - 1), x(0) = 1, x(1) = 4*D*m^2 - 1, y(0) = 1, y(1) = 4*D*m^2 - 3. The two recurrences are of the form (4*D*m^2 - 2, -1).
It follows from the above that this sequence belongs to A031396. (End)

References

  • L. B. W. Jolley, "Summation of Series", Dover Publications, 1961, p. 176.

Crossrefs

Subsequence of A077426 (D values (not a square) for which Pell x^2 - D*y^2 = -4 is solvable in positive integers).
Subsequence of A031396.

Programs

  • Magma
    [4*n^2+4*n+5 : n in [0..80]]; // Wesley Ivan Hurt, Aug 29 2022
  • Mathematica
    Table[4 n (n + 1) + 5, {n, 0, 45}] (* or *)
    Table[8 Binomial[n + 1, 2] + 5, {n, 0, 45}] (* or *)
    CoefficientList[Series[(5 - 2 x + 5 x^2)/(1 - x)^3, {x, 0, 45}], x] (* Michael De Vlieger, Jan 04 2017 *)
  • PARI
    a(n)=4*n^2+4*n+5 \\ Charles R Greathouse IV, Sep 24 2015
    
  • Python
    a= lambda n: 4*n**2+4*n+5 # Indranil Ghosh, Jan 04 2017
    
  • Scala
    (1 to 99 by 2).map(n => n * n + 4) // Alonso del Arte, May 29 2019
    

Formula

a(n) = (2*n + 1)^2 + 4.
a(n) = 4*(n+1)*n + 5 = 8*binomial(n+1, 2) + 5, hence subsequence of A004770 (5 (mod 8) numbers). [Typo fixed by Zak Seidov, Feb 26 2012]
G.f.: (5 - 2*x + 5*x^2)/(1 - x)^3.
a(n) = 8*n + a(n-1), with a(0) = 5. - Vincenzo Librandi, Aug 08 2010
a(n) = A016754(n) + 4. - Leo Tavares, Feb 22 2023
From Elmo R. Oliveira, Oct 31 2024: (Start)
E.g.f.: (5 + 8*x + 4*x^2)*exp(x).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 2. (End)

Extensions

More terms from Max Alekseyev, Mar 03 2010

A017137 a(n) = 8*n + 6.

Original entry on oeis.org

6, 14, 22, 30, 38, 46, 54, 62, 70, 78, 86, 94, 102, 110, 118, 126, 134, 142, 150, 158, 166, 174, 182, 190, 198, 206, 214, 222, 230, 238, 246, 254, 262, 270, 278, 286, 294, 302, 310, 318, 326, 334, 342, 350, 358, 366, 374, 382, 390, 398, 406, 414, 422, 430
Offset: 0

Views

Author

N. J. A. Sloane, Dec 11 1996

Keywords

Comments

First differences of A002943. - Aaron David Fairbanks, May 13 2014

Examples

			G.f. = 6 + 14*x + 22*x^2 + 30*x^3 + 38*x^4 + 46*x^5 + 54*x^6 + 62*x^7 + ...
		

Crossrefs

Programs

Formula

a(n) = 2*A004767(n) = A000290(A017245(n)) - A156676(n+1). - Reinhard Zumkeller, Jul 13 2010
a(n) = 2*a(n-1) - a(n-2). - Vincenzo Librandi, Jun 07 2011
A089911(3*a(n)) = 4. - Reinhard Zumkeller, Jul 05 2013
From Michael Somos, May 15 2014: (Start)
G.f.: (6 + 2*x)/(1 - x)^2.
E.g.f.: (6 + 8*x)*exp(x). (End)
Sum_{n>=0} (-1)^n/a(n) = (Pi + log(3-2*sqrt(2)))/(8*sqrt(2)). - Amiram Eldar, Dec 11 2021
a(n) = A016825(2*n+1). - Elmo R. Oliveira, Apr 12 2025

A047461 Numbers that are congruent to {1, 4} mod 8.

Original entry on oeis.org

1, 4, 9, 12, 17, 20, 25, 28, 33, 36, 41, 44, 49, 52, 57, 60, 65, 68, 73, 76, 81, 84, 89, 92, 97, 100, 105, 108, 113, 116, 121, 124, 129, 132, 137, 140, 145, 148, 153, 156, 161, 164, 169, 172, 177, 180, 185, 188, 193, 196, 201, 204, 209, 212, 217, 220, 225, 228, 233
Offset: 1

Views

Author

Keywords

Comments

Maximal number of squares that can be covered by a queen on an n X n chessboard. - Reinhard Zumkeller, Dec 15 2008

Crossrefs

Programs

  • GAP
    Filtered([1..250], n->n mod 8=1 or n mod 8 =4); # Muniru A Asiru, Jul 23 2018
    
  • Magma
    [4*n-3 - ((n+1) mod 2): n in [1..70]]; // G. C. Greubel, Mar 15 2024
    
  • Maple
    seq(coeff(series(factorial(n)*((8-exp(-x)+(8*x-7)*exp(x))/2), x,n+1),x,n),n=1..60); # Muniru A Asiru, Jul 23 2018
  • Mathematica
    Flatten[(#+{1,4})&/@(8Range[0,30])] (* or *) LinearRecurrence[ {1,1,-1},{1,4,9},60] (* Harvey P. Dale, Jun 18 2013 *)
    CoefficientList[ Series[(4x^2 + 3x + 1)/((x + 1) (x - 1)^2), {x, 0, 58}], x] (* Robert G. Wilson v, Jul 24 2018 *)
  • Maxima
    makelist(4*n -(7 + (-1)^n)/2, n, 1, 100); /* Franck Maminirina Ramaharo, Jul 22 2018 */
    
  • Python
    def A047461(n): return (n-1<<2)|(n&1) # Chai Wah Wu, Mar 30 2024
  • SageMath
    [4*n-3 - ((n+1)%2) for n in range(1,71)] # G. C. Greubel, Mar 15 2024
    

Formula

From R. J. Mathar, Oct 29 2008: (Start)
G.f.: x*(1+3*x+4*x^2)/((1+x)*(1-x)^2).
a(n) = a(n-2) + 8.
a(n) + a(n+1) = A004770(n).
a(n+1) - a(n) = A010703(n). (End)
a(n) = 8*floor((n-1)/2) + 4 - 3*(n mod 2). - Reinhard Zumkeller, Dec 15 2008
a(n) = A153125(n,n). - Reinhard Zumkeller, Dec 20 2008
a(n) = 8*n - a(n-1) - 11 (with a(1)=1). - Vincenzo Librandi, Aug 06 2010
a(n) = 4*n - (7 + (-1)^n)/2. - Arkadiusz Wesolowski, Sep 18 2012
a(1)=1, a(2)=4, a(3)=9, a(n) = a(n-1) + a(n-2) - a(n-3). - Harvey P. Dale, Jun 18 2013
a(n) = 1 + A004526(n)*3 + A004526(n-1)*5. - Gregory R. Bryant, Apr 16 2014
From Franck Maminirina Ramaharo, Jul 22 2018: (Start)
a(n) = A047470(n) + 1.
E.g.f.: (8 - exp(-x) + (8*x - 7)*exp(x))/2. (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = (sqrt(2)+1)*Pi/16 + log(2)/4 + sqrt(2)*arccoth(sqrt(2))/8. - Amiram Eldar, Dec 11 2021

A078371 a(n) = (2*n+5)*(2*n+1).

Original entry on oeis.org

5, 21, 45, 77, 117, 165, 221, 285, 357, 437, 525, 621, 725, 837, 957, 1085, 1221, 1365, 1517, 1677, 1845, 2021, 2205, 2397, 2597, 2805, 3021, 3245, 3477, 3717, 3965, 4221, 4485, 4757, 5037, 5325, 5621, 5925, 6237, 6557, 6885, 7221, 7565, 7917, 8277, 8645
Offset: 0

Views

Author

Wolfdieter Lang, Nov 29 2002

Keywords

Comments

This is the generic form of D in the (nontrivially) solvable Pell equation x^2 - D*y^2 = +4. See A077428 and A078355.
Consider all primitive Pythagorean triples (a,b,c) with c-a=8, sequence gives values of a. (Corresponding values for b are A017113(n), while c follows A078370(n).) - Lambert Klasen (Lambert.Klasen(AT)gmx.net), Nov 19 2004
From Vincenzo Librandi, Aug 08 2010: (Start)
The identity (4*n^3 + 18*n^2 + 24*n + 9)^2 - (4*n^2 + 12*n + 5)*(2*n^2 + 6*n + 4)^2 = 1 (see Ramasamy's paper in link) can be written as A141530(n+2)^2 - a(n)*A046092(n+1)^2 = 1.
a(n)^3 + 6*a(n)^2 + 9*a(n) + 4 is a square: in fact, a(n)^3 + 6*a(n)^2 + 9*a(n) + 4 = (a(n) + 1)^2*(a(n) + 4), where a(n) + 4 = (2*n+3)^2. (End)
Products of two positive odd integers with difference 4 (i.e., 1*5, 3*7, 5*9, 7*11, 9*13, ...). - Wesley Ivan Hurt, Nov 19 2013
Starting with stage 1, the number of active (ON, black) cells in n-th stage of growth of two-dimensional cellular automaton defined by "Rule 675", based on the 5-celled von Neumann neighborhood. - Robert Price, May 21 2016
The continued fraction expansion of (sqrt(a(n))-1)/2 is [n; {1,2*n+1}] with periodic part of length 2: repeat {1,2*n+1}. - Ron Knott, May 11 2017
a(n) is the sum of 2*n+5 consecutive integers starting from n-1. - Bruno Berselli, Jan 16 2018
The continued fraction expansion of sqrt(a(n)) is [2n+2; {1, n, 2, n, 1, 4n+4}]. For n=0, this collapses to [2; {4}]. - Magus K. Chu, Aug 26 2022

Crossrefs

Subsequence of A077425 (D values (not a square) for which Pell x^2 - D*y^2 = +4 is solvable in positive integers).
Supersequence of A143206.

Programs

  • Magma
    [(2*n+5)*(2*n+1): n in [0..100]]; // G. C. Greubel, Sep 19 2018
  • Maple
    seq((2*n+5)*(2*n+1), n=0..48); # Emeric Deutsch, Feb 24 2005
  • Mathematica
    Table[(2 n + 5) (2 n + 1), {n, 0, 100}] (* Wesley Ivan Hurt, Nov 19 2013 *)
    LinearRecurrence[{3,-3,1},{5,21,45},50] (* Harvey P. Dale, Oct 18 2020 *)
  • PARI
    lista(nn) = {for (n=0, nn, print1((2*n+1)*(2*n+5), ", "));} \\ Michel Marcus, Nov 21 2013
    

Formula

a(n) = 8*(binomial(n+2, 2)-1)+5, hence subsequence of A004770 (5 (mod 8) numbers).
G.f.: (5 + 6*x - 3*x^2)/(1-x)^3.
a(n) = A061037(2*n+1) = (2*n+3)^2 - 4. For A061037: a(2*n+1) = (2*n+1)*(2*n+5) = (2*n+3)^2-4. - Paul Curtz, Sep 24 2008
a(n) = 8*(n+1) + a(n-1) for n > 0, a(0)=5. - Vincenzo Librandi, Aug 08 2010
From Ilya Gutkovskiy, May 22 2016: (Start)
E.g.f.: (5 + 4*x*(4 + x))*exp(x).
Sum_{n>=0} 1/a(n) = 1/3. (End)
Sum_{n>=0} (-1)^n/a(n) = 1/6. - Amiram Eldar, Oct 08 2023

Extensions

More terms from Emeric Deutsch, Feb 24 2005

A347834 An array A of the positive odd numbers, read by antidiagonals upwards, giving the present triangle T.

Original entry on oeis.org

1, 3, 5, 7, 13, 21, 9, 29, 53, 85, 11, 37, 117, 213, 341, 15, 45, 149, 469, 853, 1365, 17, 61, 181, 597, 1877, 3413, 5461, 19, 69, 245, 725, 2389, 7509, 13653, 21845, 23, 77, 277, 981, 2901, 9557, 30037, 54613, 87381, 25, 93, 309, 1109, 3925, 11605, 38229, 120149, 218453, 349525
Offset: 1

Views

Author

Wolfdieter Lang, Sep 20 2021

Keywords

Comments

For the definition of this array A see the formula section.
The rows of A appear in a draft by Immmo O. Kerner in eqs. (1) and (2) as so-called horizontal sequences (horizontale Folgen). Thanks to Dr. A. Eckert for sending me this paper.
This array with entry A(k, n) becomes equal to the array T with T(n, k) given in A178415 by using a permutation of the rows, and changing the offset: A(k, n) = T(pe(k), n+1), with pe(3*(L+1)) = 4*(L+1), pe(1+3*L) = 1 + 2*L, pe(2+3*L) = 2*(1 + 2*L), for L >= 0. This permutation appears in A265667.
A proper sub-array is A238475(n, k) = A(1 + 3*(k-1), n-1), for k >= 1 and n >= 1.
In the directed Collatz tree with nodes labeled with only positive odd numbers (see A256598 for the paths), here called CTodd, the level L = 0 (on the top) has the node with label 1 as root. Because 1 -> 1 there is an arrow (a 1-cycle or loop) at the root. The level L = 1 consists of the nodes with labels A(1, n), for n >= 1, and each node is connected to 1 by a downwards directed arrow. The next levels for L >= 2 are obtained using the successor rule (used also by Kerner): S(u) = (4*u - 1)/3 if u == 1 (mod 3), (2*u - 1)/3 if u == 5 (mod 3), and there is no successor S(u) = empty if u = 3 (mod 6), that is, this node is a leaf.
However, each node with label u on level L >= 1, except a leaf, has as successors at level L + 1 not only the node with S(u) but all the nodes with labels A(S(u), n), for n >= 0.
In this way each node (also the root) of this CTodd has in-degree 1 and infinite out-degree (for L >= 2 there are infinitely many infinite outgoing arrows). All nodes with label A(k, n) with n >= 1, have the same precursor as the node A(k,0) in this tree for each k >= 1.
Except for the loop (1-cycle) for the root 1 there are no cycles in this directed tree CTodd.
That each number N = 5 + 8*K, for K >= 0 appears in array A for some column n >= 1 uniquely can be proved, using the fact of strictly increasing rows and columns, by showing that the columns n = 1, 2, ..., c contain all positive integers congruent to 5 modulo 8 except those of the positive congruence class A(1, c+1) modulo 2^(2*c+3) by induction on c. [added Dec 05 2021]
Row index k for numbers congruent to 5 modulo 8: Each number N = 5 + 8*K, for K >= 0, from A004770 is a member of row k of the array A starting with element A(k, 0) = (2*A065883(2 + 3*N) - 1)/3. For this surjective map see A347840. [simplified Dec 05 2021]
The Collatz conjecture can be reduced to the conjecture that in this rooted and directed tree CTodd each positive odd number appears as a label once, that is, all entries of the array A appear.

Examples

			The array A(k, n) begins:
k\n  0   1   2    3    4     5      6      7       8       9       10 ...
-------------------------------------------------------------------------
1:   1   5  21   85  341  1365   5461  21845   87381  349525  1398101
2:   3  13  53  213  853  3413  13653  54613  218453  873813  3495253
3:   7  29 117  469 1877  7509  30037 120149  480597 1922389  7689557
4:   9  37 149  597 2389  9557  38229 152917  611669 2446677  9786709
5:  11  45 181  725 2901 11605  46421 185685  742741 2970965 11883861
6:  15  61 245  981 3925 15701  62805 251221 1004885 4019541 16078165
7:  17  69 277 1109 4437 17749  70997 283989 1135957 4543829 18175317
8:  19  77 309 1237 4949 19797  79189 316757 1267029 5068117 20272469
9:  23  93 373 1493 5973 23893  95573 382293 1529173 6116693 24466773
10: 25 101 405 1621 6485 25941 103765 415061 1660245 6640981 26563925
...
--------------------------------------------------------------------
The triangle T(k, n) begins:
k\n  0  1   2    3    4     5     6      7      8      9 ...
------------------------------------------------------------
1:   1
2:   3  5
3:   7 13  21
4:   9 29  53   85
5:  11 37 117  213  341
6:  15 45 149  469 853   1365
7:  17 61 181  597 1877  3413  5461
8:  19 69 245  725 2389  7509 13653  21845
9:  23 77 277  981 2901  9557 30037  54613  87381
10: 25 93 309 1109 3925 11605 38229 120149 218453 349525
...
-------------------------------------------------------------
Row index k of array A, for entries 5 (mod 8).
213 = 5 + 8*26. K = 28 is even, (3*231+1)/16 = 40, A065883(40) = 10, hence A(k, 0) = N' = (10-1)/3 = 3, and k = 2. Moreover, n = log_4((3*213 + 1)/(3*A(2,0) + 1)) = log_4(64) = 3. 213 = A(2, 3).
85 = 5 + 8*10. K = 10 is even, (3*85 + 1)/16 = 16, A065883(16) = 1, N' = (1-1)/3 = 0 is even, hence A(k, 0) = 4*0 + 1 = 1, k = 1. 85 = A(1, 3).
61 = 5 + 8*7, K = 7 is odd, k = (7+1)/2 + ceiling((7+1)/4) = 6, and n = log_4((3*61 + 1)/(3*A(6,0) + 1)) = 1. 61 = A(6, 1).
----------------------------------------------------------------------------
		

Crossrefs

Row sequences of the array A, also diagonal sequences of the triangle T: -A007583 (k=0), A002450(n+1), A072197, A072261(n+1), A206374(n+1), A072262(n+1), A072262(n+1), A072201(n+1), A330246(n+1), ...
Column sequences of the array A, also of the triangle T (shifted): A047529, A347836, A347837, ...

Programs

  • Maple
    # Seen as an array:
    A := (n, k) -> ((3*(n + floor(n/3)) - 1)*4^(k+1) - 2)/6:
    for n from 1 to 6 do seq(A(n, k), k = 0..9) od;
    # Seen as a triangle:
    T := (n, k) -> 2^(2*k + 1)*(floor((n - k)/3) - k + n - 1/3) - 1/3:
    for n from 1 to 9 do seq(T(n, k), k = 0..n-1) od;
    # Using row expansion:
    gf_row := k -> (1 / (x - 1) - A047395(k)) / (4*x - 1):
    for k from 1 to 10 do seq(coeff(series(gf_row(k), x, 11), x, n), n = 0..10) od;
    # Peter Luschny, Oct 09 2021
  • Mathematica
    A347834[k_, n_] := (4^n*(6*(Floor[k/3] + k) - 2) - 1)/3;
    Table[A347834[k - n, n], {k, 10}, {n, 0, k - 1}] (* Paolo Xausa, Jun 26 2025 *)

Formula

Array A:
A(k, 0) = A047529(k) (the positive odd numbers {1, 3, 7} (mod 8));
A(k, n) = ((3* A(k, 0) + 1)*4^n - 1)/3, for k >= 1 and n >= 0.
Recurrence for rows k >= 1: A(k, n) = 4*A(k, n-1) + 1, for n >= 1, with A(k, 0) = 2*(k + floor(k/3)) - 1 = A047529(k).
Explicit form: A(k, n) = ((3*(k + floor(k/3)) - 1)*4^(n+1) - 2)/6, k >= 1, n >= 0. Here 3*(k + floor(k/3)) = A319451(k).
Hence A(k, n) = 5 + 8*(2*A(k, n-2)), for n >= 1, with A(k, 0) = 2*(k + floor(k/3)) - 1 = A047529(k), and 2*A(k, -1) = (A(k, 1) - 5)/8 = k - 1 + floor(k/3) (equals index n of A(k, 1) in the sequence (A004770(n+1))_{n >= 0}). A(k, -1) is half-integer if k = A007494(m) = m + ceiling(m/2), for m >= 1, and A(k, -1) = 2*K if k = 1 + 3*K = A016777(K), for K >= 0.
O.g.f.: expansion in z gives o.g.f.s for rows k, also for k = 0: -A007583; expansion in x gives o.g.f.s for columns n.
G(z, x) = (2*(-1 + 3*z + 3*z^2 + 7*z^3)*(1-x) - (1-4*x)*(1-z^3)) / (3*(1-x)*(1-4*x)*(1-z)*(1-z^3)).
Triangle T:
T(k, n) = A(k - n, n), for k >= 1 and n = 0..k-1.
A(k, n) = [x^n] (1/(x - 1) - A047395(k)) / (4*x - 1). - Peter Luschny, Oct 09 2021

A047615 Numbers that are congruent to {0, 5} mod 8.

Original entry on oeis.org

0, 5, 8, 13, 16, 21, 24, 29, 32, 37, 40, 45, 48, 53, 56, 61, 64, 69, 72, 77, 80, 85, 88, 93, 96, 101, 104, 109, 112, 117, 120, 125, 128, 133, 136, 141, 144, 149, 152, 157, 160, 165, 168, 173, 176, 181, 184, 189, 192, 197, 200, 205, 208, 213, 216, 221, 224, 229, 232
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • GAP
    Filtered([0..250], n->n mod 8=0 or n mod 8=5); # Muniru A Asiru, Jul 23 2018
    
  • Magma
    [(8*n - 7 + (-1)^n)/2 : n in [1..50]]; // Wesley Ivan Hurt, Mar 26 2015
    
  • Maple
    a:=n->add(4-(-1)^j, j=1..n): seq(a(n), n=0..59); # Zerinvary Lajos, Dec 13 2008
  • Mathematica
    Table[(8 n - 7 + (-1)^n)/2, {n, 1, 40}] (* Wesley Ivan Hurt, Mar 26 2015 *)
    Rest@ CoefficientList[Series[x^2*(5 + 3 x)/((1 - x)^2*(1 + x)), {x, 0, 59}], x] (* Michael De Vlieger, Aug 25 2016 *)
    Rest@(Range[0, 60]! CoefficientList[ Series[(6 + Exp[-x] + (8 x - 7)*Exp[x])/2, {x, 0, 60}], x]) (* or *)
    LinearRecurrence[{1, 1, -1}, {0, 5, 8}, 60] (* Robert G. Wilson v, Jul 23 2018 *)
  • PARI
    forstep(n=0,200,[5,3],print1(n", ")) \\ Charles R Greathouse IV, Oct 17 2011
    
  • PARI
    concat(0, Vec(x^2*(5+3*x)/((1-x)^2*(1+x)) + O(x^100))) \\ Colin Barker, Aug 25 2016
    
  • Python
    def A047615(n): return (n<<2)-3-(n&1) # Chai Wah Wu, Mar 30 2024

Formula

a(n) = 8*n-a(n-1)-11 (with a(1)=0). - Vincenzo Librandi, Aug 06 2010
a(n+1) = Sum_{k>=0} A030308(n,k)*b(k) with b(0)=5 and b(k)=2^(k+2) for k>0. - Philippe Deléham, Oct 17 2011
From Wesley Ivan Hurt, Mar 26 2015: (Start)
a(n) = a(n-1)+a(n-2)-a(n-3).
a(n) = (8n - 7 + (-1)^n)/2. (End)
G.f.: x^2*(5+3*x) / ((1-x)^2*(1+x)). - Colin Barker, Aug 25 2016
From Franck Maminirina Ramaharo, Jul 23 2018: (Start)
a(n) = A047470(n) - (-1)^(n - 1) + 1.
E.g.f.: (6 + exp(-x) + (8*x - 7)*exp(x))/2. (End)
Sum_{n>=2} (-1)^n/a(n) = log(2)/2 - (sqrt(2)-1)*Pi/16 - sqrt(2)*log(sqrt(2)+1)/8. - Amiram Eldar, Dec 18 2021

Extensions

More terms from Vincenzo Librandi, Aug 06 2010

A047529 Numbers that are congruent to {1, 3, 7} mod 8.

Original entry on oeis.org

1, 3, 7, 9, 11, 15, 17, 19, 23, 25, 27, 31, 33, 35, 39, 41, 43, 47, 49, 51, 55, 57, 59, 63, 65, 67, 71, 73, 75, 79, 81, 83, 87, 89, 91, 95, 97, 99, 103, 105, 107, 111, 113, 115, 119, 121, 123, 127, 129, 131, 135, 137, 139, 143, 145, 147, 151, 153, 155, 159
Offset: 1

Views

Author

Keywords

Comments

Terms that occur on the first two rows of array A257852. Odd numbers that are not of the form 4k+1, where k is an odd number. - Antti Karttunen, Jun 06 2024

Examples

			G.f. = x + 3*x^2 + 7*x^3 + 9*x^4 + 11*x^5 + 15*x^6 + 17*x^7 + 19*x^8 + 23*x^9 + ...
		

Crossrefs

Setwise difference A005408 \ A004770.
Disjoint union of A004767 and A017077; see A257852.

Programs

  • Magma
    [n : n in [0..150] | n mod 8 in [1, 3, 7]]; // Wesley Ivan Hurt, Jun 13 2016
  • Maple
    A047529:=n->(24*n+2*sqrt(3)*sin(2*Pi*n/3)+6*cos(2*Pi*n/3)-15)/9: seq(A047529(n), n=1..100); # Wesley Ivan Hurt, Jun 13 2016
  • Mathematica
    Select[Range[150], MemberQ[{1,3,7}, Mod[#,8]]&] (* Harvey P. Dale, May 02 2011 *)
    LinearRecurrence[{1, 0, 1, -1}, {1, 3, 7, 9}, 100] (* Vincenzo Librandi, Jun 14 2016 *)
  • PARI
    Vec(x*(x^3+4*x^2+2*x+1)/((x-1)^2*(x^2+x+1)) + O(x^100)) \\ Colin Barker, Nov 12 2015
    
  • PARI
    {a(n) = n\3 * 8 + [-1, 1, 3][n%3 + 1]}; /* Michael Somos, Nov 15 2015 */
    

Formula

a(n) = (24*n+2*sqrt(3)*sin(2*Pi*n/3)+6*cos(2*Pi*n/3)-15)/9. - Fred Daniel Kline, Nov 12 2015
From Colin Barker, Nov 12 2015: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4) for n>4.
G.f.: x*(x^3+4*x^2+2*x+1) / ((x-1)^2*(x^2+x+1)). (End)
a(n+3) = a(n) + 8 for all n in Z. - Michael Somos, Nov 15 2015
a(3k) = 8k-1, a(3k-1) = 8k-5, a(3k-2) = 8k-7. - Wesley Ivan Hurt, Jun 13 2016
a(n) = 8 * floor((n-1) / 3) + 2^(((n-1) mod 3) + 1) - 1. - Fred Daniel Kline, Aug 09 2016
a(n) = 2*(n + floor(n/3)) - 1. - Wolfdieter Lang, Sep 10 2021
Showing 1-10 of 30 results. Next