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 14 results. Next

A007310 Numbers congruent to 1 or 5 mod 6.

Original entry on oeis.org

1, 5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35, 37, 41, 43, 47, 49, 53, 55, 59, 61, 65, 67, 71, 73, 77, 79, 83, 85, 89, 91, 95, 97, 101, 103, 107, 109, 113, 115, 119, 121, 125, 127, 131, 133, 137, 139, 143, 145, 149, 151, 155, 157, 161, 163, 167, 169, 173, 175
Offset: 1

Views

Author

C. Christofferson (Magpie56(AT)aol.com)

Keywords

Comments

Numbers n such that phi(4n) = phi(3n). - Benoit Cloitre, Aug 06 2003
Or, numbers relatively prime to 2 and 3, or coprime to 6, or having only prime factors >= 5; also known as 5-rough numbers. (Edited by M. F. Hasler, Nov 01 2014: merged with comments from Zak Seidov, Apr 26 2007 and Michael B. Porter, Oct 09 2009)
Apart from initial term(s), dimension of the space of weight 2n cuspidal newforms for Gamma_0( 38 ).
Numbers k such that k mod 2 = 1 and (k+1) mod 3 <> 1. - Klaus Brockhaus, Jun 15 2004
Also numbers n such that the sum of the squares of the first n integers is divisible by n, or A000330(n) = n*(n+1)*(2*n+1)/6 is divisible by n. - Alexander Adamchuk, Jan 04 2007
Numbers n such that the sum of squares of n consecutive integers is divisible by n, because A000330(m+n) - A000330(m) = n*(n+1)*(2*n+1)/6 + n*(m^2+n*m+m) is divisible by n independent of m. - Kaupo Palo, Dec 10 2016
A126759(a(n)) = n + 1. - Reinhard Zumkeller, Jun 16 2008
Terms of this sequence (starting from the second term) are equal to the result of the expression sqrt(4!*(k+1) + 1) - but only when this expression yields integral values (that is when the parameter k takes values, which are terms of A144065). - Alexander R. Povolotsky, Sep 09 2008
For n > 1: a(n) is prime if and only if A075743(n-2) = 1; a(2*n-1) = A016969(n-1), a(2*n) = A016921(n-1). - Reinhard Zumkeller, Oct 02 2008
A156543 is a subsequence. - Reinhard Zumkeller, Feb 10 2009
Numbers n such that ChebyshevT(x, x/2) is not an integer (is integer/2). - Artur Jasinski, Feb 13 2010
If 12*k + 1 is a perfect square (k = 0, 2, 4, 10, 14, 24, 30, 44, ... = A152749) then the square root of 12*k + 1 = a(n). - Gary Detlefs, Feb 22 2010
A089128(a(n)) = 1. Complement of A047229(n+1) for n >= 1. See A164576 for corresponding values A175485(a(n)). - Jaroslav Krizek, May 28 2010
Cf. property described by Gary Detlefs in A113801 and in Comment: more generally, these numbers are of the form (2*h*n+(h-4)*(-1)^n-h)/4 (with h, n natural numbers), therefore ((2*h*n+(h-4)*(-1)^n-h)/4)^2-1 == 0 (mod h); in this case, a(n)^2 - 1 == 0 (mod 6). Also a(n)^2 - 1 == 0 (mod 12). - Bruno Berselli, Nov 05 2010 - Nov 17 2010
Numbers n such that ( Sum_{k = 1..n} k^14 ) mod n = 0. (Conjectured) - Gary Detlefs, Dec 27 2011
From Peter Bala, May 02 2018: (Start)
The above conjecture is true. Apply Ireland and Rosen, Proposition 15.2.2. with m = 14 to obtain the congruence 6*( Sum_{k = 1..n} k^14 )/n = 7 (mod n), true for all n >= 1. Suppose n is coprime to 6, then 6 is a unit in Z/nZ, and it follows from the congruence that ( Sum_{k = 1..n} k^14 )/n is an integer. On the other hand, if either 2 divides n or 3 divides n then the congruence shows that ( Sum_{k = 1..n} k^14 )/n cannot be integral. (End)
A126759(a(n)) = n and A126759(m) < n for m < a(n). - Reinhard Zumkeller, May 23 2013
(a(n-1)^2 - 1)/24 = A001318(n), the generalized pentagonal numbers. - Richard R. Forberg, May 30 2013
Numbers k for which A001580(k) is divisible by 3. - Bruno Berselli, Jun 18 2014
Numbers n such that sigma(n) + sigma(2n) = sigma(3n). - Jahangeer Kholdi and Farideh Firoozbakht, Aug 15 2014
a(n) are values of k such that Sum_{m = 1..k-1} m*(k-m)/k is an integer. Sums for those k are given by A062717. Also see Detlefs formula below based on A062717. - Richard R. Forberg, Feb 16 2015
a(n) are exactly those positive integers m such that the sequence b(n) = n*(n + m)*(n + 2*m)/6 is integral, and also such that the sequence c(n) = n*(n + m)*(n + 2*m)*(n + 3*m)/24 is integral. Cf. A007775. - Peter Bala, Nov 13 2015
Along with 2, these are the numbers k such that the k-th Fibonacci number is coprime to every Lucas number. - Clark Kimberling, Jun 21 2016
This sequence is the Engel expansion of 1F2(1; 5/6, 7/6; 1/36) + 1F2(1; 7/6, 11/6; 1/36)/5. - Benedict W. J. Irwin, Dec 16 2016
The sequence a(n), n >= 4 is generated by the successor of the pair of polygonal numbers {P_s(4) + 1, P_(2*s - 1)(3) + 1}, s >= 3. - Ralf Steiner, May 25 2018
The asymptotic density of this sequence is 1/3. - Amiram Eldar, Oct 18 2020
Also, the only vertices in the odd Collatz tree A088975 that are branch values to other odd nodes t == 1 (mod 2) of A005408. - Heinz Ebert, Apr 14 2021
From Flávio V. Fernandes, Aug 01 2021: (Start)
For any two terms j and k, the product j*k is also a term (the same property as p^n and smooth numbers).
From a(2) to a(phi(A033845(n))), or a((A033845(n))/3), the terms are the totatives of the A033845(n) itself. (End)
Also orders n for which cyclic and semicyclic diagonal Latin squares exist (see A123565 and A342990). - Eduard I. Vatutin, Jul 11 2023
If k is in the sequence, then k*2^m + 3 is also in the sequence, for all m > 0. - Jules Beauchamp, Aug 29 2024

Examples

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

References

  • K. Ireland and M. Rosen, A Classical Introduction to Modern Number Theory, Springer-Verlag, 1980.

Crossrefs

A005408 \ A016945. Union of A016921 and A016969; union of A038509 and A140475. Essentially the same as A038179. Complement of A047229. Subsequence of A186422.
Cf. A000330, A001580, A002194, A019670, A032528 (partial sums), A038509 (subsequence of composites), A047209, A047336, A047522, A056020, A084967, A090771, A091998, A144065, A175885-A175887.
For k-rough numbers with other values of k, see A000027, A005408, A007775, A008364-A008366, A166061, A166063.
Cf. A126760 (a left inverse).
Row 3 of A260717 (without the initial 1).
Cf. A105397 (first differences).

Programs

Formula

a(n) = (6*n + (-1)^n - 3)/2. - Antonio Esposito, Jan 18 2002
a(n) = a(n-1) + a(n-2) - a(n-3), n >= 4. - Roger L. Bagula
a(n) = 3*n - 1 - (n mod 2). - Zak Seidov, Jan 18 2006
a(1) = 1 then alternatively add 4 and 2. a(1) = 1, a(n) = a(n-1) + 3 + (-1)^n. - Zak Seidov, Mar 25 2006
1 + 1/5^2 + 1/7^2 + 1/11^2 + ... = Pi^2/9 [Jolley]. - Gary W. Adamson, Dec 20 2006
For n >= 3 a(n) = a(n-2) + 6. - Zak Seidov, Apr 18 2007
From R. J. Mathar, May 23 2008: (Start)
Expand (x+x^5)/(1-x^6) = x + x^5 + x^7 + x^11 + x^13 + ...
O.g.f.: x*(1+4*x+x^2)/((1+x)*(1-x)^2). (End)
a(n) = 6*floor(n/2) - 1 + 2*(n mod 2). - Reinhard Zumkeller, Oct 02 2008
1 + 1/5 - 1/7 - 1/11 + + - - ... = Pi/3 = A019670 [Jolley eq (315)]. - Jaume Oliver Lafont, Oct 23 2009
a(n) = ( 6*A062717(n)+1 )^(1/2). - Gary Detlefs, Feb 22 2010
a(n) = 6*A000217(n-1) + 1 - 2*Sum_{i=1..n-1} a(i), with n > 1. - Bruno Berselli, Nov 05 2010
a(n) = 6*n - a(n-1) - 6 for n>1, a(1) = 1. - Vincenzo Librandi, Nov 18 2010
Sum_{n >= 1} (-1)^(n+1)/a(n) = A093766 [Jolley eq (84)]. - R. J. Mathar, Mar 24 2011
a(n) = 6*floor(n/2) + (-1)^(n+1). - Gary Detlefs, Dec 29 2011
a(n) = 3*n + ((n+1) mod 2) - 2. - Gary Detlefs, Jan 08 2012
a(n) = 2*n + 1 + 2*floor((n-2)/2) = 2*n - 1 + 2*floor(n/2), leading to the o.g.f. given by R. J. Mathar above. - Wolfdieter Lang, Jan 20 2012
1 - 1/5 + 1/7 - 1/11 + - ... = Pi*sqrt(3)/6 = A093766 (L. Euler). - Philippe Deléham, Mar 09 2013
1 - 1/5^3 + 1/7^3 - 1/11^3 + - ... = Pi^3*sqrt(3)/54 (L. Euler). - Philippe Deléham, Mar 09 2013
gcd(a(n), 6) = 1. - Reinhard Zumkeller, Nov 14 2013
a(n) = sqrt(6*n*(3*n + (-1)^n - 3)-3*(-1)^n + 5)/sqrt(2). - Alexander R. Povolotsky, May 16 2014
a(n) = 3*n + 6/(9*n mod 6 - 6). - Mikk Heidemaa, Feb 05 2016
From Mikk Heidemaa, Feb 11 2016: (Start)
a(n) = 2*floor(3*n/2) - 1.
a(n) = A047238(n+1) - 1. (suggested by Michel Marcus) (End)
E.g.f.: (2 + (6*x - 3)*exp(x) + exp(-x))/2. - Ilya Gutkovskiy, Jun 18 2016
From Bruno Berselli, Apr 27 2017: (Start)
a(k*n) = k*a(n) + (4*k + (-1)^k - 3)/2 for k>0 and odd n, a(k*n) = k*a(n) + k - 1 for even n. Some special cases:
k=2: a(2*n) = 2*a(n) + 3 for odd n, a(2*n) = 2*a(n) + 1 for even n;
k=3: a(3*n) = 3*a(n) + 4 for odd n, a(3*n) = 3*a(n) + 2 for even n;
k=4: a(4*n) = 4*a(n) + 7 for odd n, a(4*n) = 4*a(n) + 3 for even n;
k=5: a(5*n) = 5*a(n) + 8 for odd n, a(5*n) = 5*a(n) + 4 for even n, etc. (End)
From Antti Karttunen, May 20 2017: (Start)
a(A273669(n)) = 5*a(n) = A084967(n).
a((5*n)-3) = A255413(n).
A126760(a(n)) = n. (End)
a(2*m) = 6*m - 1, m >= 1; a(2*m + 1) = 6*m + 1, m >= 0. - Ralf Steiner, May 17 2018
From Amiram Eldar, Nov 22 2024: (Start)
Product_{n>=1} (1 - (-1)^n/a(n)) = sqrt(3) (A002194).
Product_{n>=2} (1 + (-1)^n/a(n)) = Pi/3 (A019670). (End)

A080335 Diagonal in square spiral or maze arrangement of natural numbers.

Original entry on oeis.org

1, 5, 9, 17, 25, 37, 49, 65, 81, 101, 121, 145, 169, 197, 225, 257, 289, 325, 361, 401, 441, 485, 529, 577, 625, 677, 729, 785, 841, 901, 961, 1025, 1089, 1157, 1225, 1297, 1369, 1445, 1521, 1601, 1681, 1765, 1849, 1937, 2025, 2117, 2209, 2305, 2401, 2501
Offset: 0

Views

Author

Paul Barry, Mar 19 2003

Keywords

Comments

Interleaves the odd squares A016754 with (1+4n^2), A053755.
Squares of positive integers (plus 1 if n is odd). - Wesley Ivan Hurt, Oct 10 2013
a(n) is the maximum total number of queens that can coexist without attacking each other on an [n+3] X [n+3] chessboard, when the lone queen is in the most vulnerable position on the board. Specifically, the lone queen will placed in any center position, facing an opponent's "army" of size a(n)-1 == A137932(n+2). - Bob Selcoe, Feb 12 2015
a(n) is also the edge chromatic number of the complement of the (n+2) X (n+2) rook graph. - Eric W. Weisstein, Jan 31 2024

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.

Programs

Formula

a(n) = (3 + 4*n + 2*n^2 - (-1)^n)/2.
a(2*n) = A016754(n), a(2*n+1) = A053755(n+1).
E.g.f.: exp(x)*(2 + 3*x + x^2) - cosh(x). The sequence 1,1,5,9,... is given by n^2+(1+(-1)^n)/2 with e.g.f. exp(1+x+x^2)*exp(x)-sinh(x). - Paul Barry, Sep 02 2003 and Sep 19 2003
a(0)=1, a(1)=5, a(2)=9, a(3)=17, a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4). - Harvey P. Dale, Jan 29 2012
a(n)+(-1)^n = A137928(n+1). - Philippe Deléham, Feb 17 2012
G.f.: (1 + 3*x - x^2 + x^3)/((1-x)^3*(1+x)). - Colin Barker, Mar 18 2012
a(n) = A000035(n) + A000290(n+1). - Wesley Ivan Hurt, Oct 10 2013
From Bob Selcoe, Feb 12 2015: (Start)
a(n) = A137932(n+2) + 1.
a(n) = (n+1)^2 when n is even; a(n) = (n+1)^2 + 1 when n is odd.
a(n) = A002378(n+2) - A047238(n+3) + 1.
(End)
Sum_{n>=0} 1/a(n) = Pi*coth(Pi/2)/4 + Pi^2/8 - 1/2. - Amiram Eldar, Jul 07 2022

A137932 Terms in an n X n spiral that do not lie on its principal diagonals.

Original entry on oeis.org

0, 0, 0, 4, 8, 16, 24, 36, 48, 64, 80, 100, 120, 144, 168, 196, 224, 256, 288, 324, 360, 400, 440, 484, 528, 576, 624, 676, 728, 784, 840, 900, 960, 1024, 1088, 1156, 1224, 1296, 1368, 1444, 1520, 1600, 1680, 1764, 1848, 1936, 2024, 2116, 2208, 2304, 2400, 2500, 2600, 2704, 2808
Offset: 0

Views

Author

William A. Tedeschi, Feb 29 2008

Keywords

Comments

The count of terms not on the principal diagonals is always even.
The last digit is the repeating pattern 0,0,0,4,8,6,4,6,8,4, which is palindromic if the leading 0's are removed, 4864684.
The sum of the last digits is 40, which is the count of the pattern times 4.
A 4 X 4 spiral is the only spiral, aside from a 0 X 0, whose count of terms that do not lie on its principal diagonals equal the count of terms that do [A137932(4) = A042948(4)] making the 4 X 4 the "perfect spiral".
Yet another property is mod(a(n), A042948(n)) = 0 iff n is even. This is a large family that includes the 4 X 4 spiral.
a(n) is the maximum number of queens of one color that can coexist without attacking one queen of the opponent's color on an [n+1] X [n+1] chessboard, when the lone queen is in the most vulnerable position on the board, i.e., on a center square. - Bob Selcoe, Feb 12 2015
Also the circumference of the (n-1) X (n-1) grid graph for n > 2. - Eric W. Weisstein, Mar 25 2018
Also the crossing number of the complete bipartite graph K_{5,n}. - Eric W. Weisstein, Sep 11 2018

Examples

			a(0) = 0^2 - (2(0) - mod(0,2)) = 0.
a(3) = 3^2 - (2(3) - mod(3,2)) = 4.
		

Crossrefs

Cf. A042948.
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.

Programs

Formula

a(n) = n^2 - (2*n - mod(n,2)) = n^2 - A042948(n).
a(n) = 2*A007590(n-1). - Enrique Pérez Herrero, Jul 04 2012
G.f.: -4*x^3 / ( (1+x)*(x-1)^3 ). a(n) = 4*A002620(n-1). - R. J. Mathar, Jul 06 2012
From Bob Selcoe, Feb 12 2015: (Start)
a(n) = (n-1)^2 when n is odd; a(n) = (n-1)^2 - 1 when n is even.
a(n) = A002378(n) - A047238(n+1). (End)
From Amiram Eldar, Mar 20 2022: (Start)
Sum_{n>=3} 1/a(n) = Pi^2/24 + 1/4.
Sum_{n>=3} (-1)^(n+1)/a(n) = Pi^2/24 - 1/4. (End)
E.g.f.: x*(x - 1)*cosh(x) + (x^2 - x + 1)*sinh(x). - Stefano Spezia, Oct 17 2022

A047270 Numbers that are congruent to {3, 5} mod 6.

Original entry on oeis.org

3, 5, 9, 11, 15, 17, 21, 23, 27, 29, 33, 35, 39, 41, 45, 47, 51, 53, 57, 59, 63, 65, 69, 71, 75, 77, 81, 83, 87, 89, 93, 95, 99, 101, 105, 107, 111, 113, 117, 119, 123, 125, 129, 131, 135, 137, 141, 143, 147, 149
Offset: 1

Views

Author

Keywords

Comments

Apart from initial term(s), dimension of the space of weight 2n cusp forms for Gamma_0( 10 ).
This sequence is an interleaving of A016945 with A016969. - Guenther Schrack, Nov 16 2018

Crossrefs

Cf. A047235 [(6*n-(-1)^n-3)/2], A047241 [(6*n-(-1)^n-5)/2], A047238 [(6*n-(-1)^n-7)/2]. [Bruno Berselli, Jun 24 2010]
Subsequence of A186422.
From Guenther Schrack, Nov 18 2018: (Start)
Complement: A047237.
First differences: A105397(n) for n > 0.
Partial sums: A227017(n+1) for n > 0.
Elements of odd index: A016945.
Elements of even index: A016969(n-1) for n > 0. (End)

Programs

  • Mathematica
    Select[Range@ 149, MemberQ[{3, 5}, Mod[#, 6]] &] (* or *)
    Array[(6 # - (-1)^# - 1)/2 &, 50] (* or *)
    Fold[Append[#1, 6 #2 - Last@ #1 - 4] &, {3}, Range[2, 50]] (* or *)
    CoefficientList[Series[(3 + 2 x + x^2)/((1 + x) (1 - x)^2), {x, 0, 49}], x] (* Michael De Vlieger, Jan 12 2018 *)
  • PARI
    a(n) = (6*n - 1 - (-1)^n)/2 \\ David Lovler, Aug 25 2022

Formula

a(n) = sqrt(2)*sqrt((1-6*n)*(-1)^n + 18*n^2 - 6*n + 1)/2. - Paul Barry, May 11 2003
From Bruno Berselli, Jun 24 2010: (Start)
G.f.: (3+2*x+x^2)/((1+x)*(1-x)^2).
a(n) - a(n-1) - a(n-2) + a(n-3) = 0, with n > 3.
a(n) = (6*n - (-1)^n - 1)/2. (End)
a(n) = 6*n - a(n-1) - 4 with n > 1, a(1)=3. - Vincenzo Librandi, Aug 05 2010
From Guenther Schrack, Nov 17 2018: (Start)
a(n) = a(n-2) + 6 for n > 2.
a(-n) = -A047241(n+1) for n > 0.
a(n) = A109613(n-1) + 2*n for n > 0.
a(n) = 2*A001651(n) + 1.
m-element moving averages: Sum_{k=1..m} a(n-m+k)/m = A016777(n-m/2) for m = 2, 4, 6, ... and n >= m. (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/(4*sqrt(3)) - log(3)/4. - Amiram Eldar, Dec 13 2021
E.g.f.: 1 + 3*x*exp(x) - cosh(x). - David Lovler, Aug 25 2022

A235800 Length of n-th vertical line segment from left to right in a diagram of a two-dimensional version of the 3x+1 (or Collatz) problem.

Original entry on oeis.org

3, 1, 7, 2, 11, 3, 15, 4, 19, 5, 23, 6, 27, 7, 31, 8, 35, 9, 39, 10, 43, 11, 47, 12, 51, 13, 55, 14, 59, 15, 63, 16, 67, 17, 71, 18, 75, 19, 79, 20, 83, 21, 87, 22, 91, 23, 95, 24, 99, 25, 103, 26, 107, 27, 111, 28, 115, 29, 119, 30, 123, 31, 127, 32
Offset: 1

Views

Author

Omar E. Pol, Jan 15 2014

Keywords

Comments

In the diagram every cycle is represented by a directed graph.
After (3x + 1) the next step is (3y + 1).
After (x/2) the next step is (y/2).
A235801(n) gives the length of n-th horizontal line segment in the same diagram.
Also A004767 and A000027 interleaved.

Examples

			The first part of the diagram in the first quadrant looks like this:
. . . . . . . . . . . . . . . . . . . . . . . .
.              _ _|_ _|_ _|_ _|_ _|_ _|_ _|_ _.
.             |   |   |   |   |   |   |   |_|_.
.             |   |   |   |   |   |   |  _ _|_.
.             |   |   |   |   |   |   |_|_ _|_.
.             |   |   |   |   |   |  _ _|_ _|_.
.             |   |   |   |   |   |_|_ _|_ _|_.
.          _ _|_ _|_ _|_ _|_ _|_ _ _|_ _|_ _|_.
.         |   |   |   |   |   |_|_ _|_ _|_ _|_.
.         |   |   |   |   |  _ _|_ _|_ _|_ _|_.
.         |   |   |   |   |_|_ _|_ _|_ _|_ _|_.
.         |   |   |   |  _ _|_ _|_ _|_ _|_ _|_.
.         |   |   |   |_|_ _|_ _|_ _|_ _|_ _| .
.      _ _|_ _|_ _|_ _ _|_ _|_ _|_ _|_ _|     .
.     |   |   |   |_|_ _|_ _|_ _|_ _|         .
.     |   |   |  _ _|_ _|_ _|_ _|             .
.     |   |   |_|_ _|_ _|_ _|                 .
.     |   |  _ _|_ _|_ _|                     .
.     |   |_|_ _|_ _|                         .
.  _ _|_ _ _|_ _|                             .
. |   |_|_ _|                                 .
. |  _ _|                                     .
. |_|                                         .
. . . . . . . . . . . . . . . . . . . . . . . .
. 3,1,7,2,11...
From _Omar E. Pol_, Aug 25 2021: (Start)
The above diagram is the skeleton of a piping model of the 3x+1 or Collatz problem as shown below:
The model consists of pipes, 90-degree elbows and three types of pumps that propel the fluid through the pipes.
The corner of the infinite diagram looks like this:
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
                            | |         | |         | |         | |  _ _ _  .
                            | |         | |         | |         | | |     |_.
                            | |         | |         | |         | | |  12  _.
                            | |         | |         | |        _| |_|_ v _| .
                            | |         | |         | |       |  ^  |_|_|_ _.
                            | |         | |         | |       |  11  _ _ _ _.
                            | |         | |         | |  _ _ _|_ _ _| | |   .
                 _ _ _ _ _ _|_|_ _ _ _ _|_|_ _ _ _ _|_|_|     |_ _ _ _|_|_ _.
                |  _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _   10  _ _ _ _ _ _ _.
                | |         | |         | |        _| |_|_ v _|       | |   .
                | |         | |         | |       |  ^  |_| |_ _ _ _ _| |_ _.
                | |         | |         | |       |  9   _| |_ _ _ _ _| |_ _.
                | |         | |         | |  _ _ _|_ _ _| | |         | |   .
                | |         | |         | | |     |_ _ _ _| |_ _ _ _ _|_|_ _.
                | |         | |         | | |  8   _ _ _ _| |_ _ _ _ _ _ _ _.
                | |         | |        _| |_|_ v _|       | |         | |   .
                | |         | |       |  ^  |_| |_ _ _ _ _| |_ _ _ _ _|_|_ _.
                | |         | |       |  7   _| |_ _ _ _ _| |_ _ _ _ _ _ _ _.
                | |         | |  _ _ _|_ _ _| | |         | |         | |   .
                | |         | | |     |_ _ _ _| |_ _ _ _ _| |_ _ _ _ _| |   .
                | |         | | |  6   _ _ _ _| |_ _ _ _ _| |_ _ _ _ _ _|   .
                | |        _| |_|_ v _|       | |         | |               .
                | |       |  ^  |_|_|_ _ _ _ _|_|_ _ _ _ _| |               .
                | |       |  5   _ _ _ _ _ _ _ _ _ _ _ _ _ _|               .
                | |  _ _ _|_ _ _| | |         | |                           .
     _ _ _ _ _ _|_|_|     |_ _ _ _|_|_ _ _ _ _| |                           .
    |  _ _ _ _ _ _ _   4   _ _ _ _ _ _ _ _ _ _ _|                           .
    | |        _| |_|_ v _|       | |                                       .
    | |       |  ^  |_| |_ _ _ _ _| |                                       .
    | |       |  3   _| |_ _ _ _ _ _|                                       .
    | |  _ _ _|_ _ _| | |                                                   .
    | | |     |_ _ _ _| |                                                   .
    | | |  2   _ _ _ _ _|                                                   .
   _| |_|_ v _|                                                             .
  |  ^  |_| |                                                               .
  |  1   _ _|                                                               .
  |_ _ _|                                                                   .
.                                                                           .
On the main diagonal of the diagram appear the pumps labeled with the positive integers (A000027).
The pumps labeled with the numbers 2, 6, 8, 12, 14, 18, 20, 24, ... (the nonzero terms of A047238) receive the fluid from the EAST and propel it in a SOUTH direction. The fluid then passes through a 90-degree elbow and then heads WEST.
The pumps labeled with the numbers 4, 10, 16, 22, 28, 34, 40, ... (A016957) are of the type "TEE" as they have two side inlets and one outlet. These receive the fluid from the EAST and from the WEST and propel it in a SOUTH direction. The fluid then passes through a 90-degree elbow and then heads WEST.
The pumps labeled with the numbers 1, 3, 5, 7, 9, 11, 13, ... (A005408) receive the fluid from the EAST and propel it in the NORTH direction. The fluid then passes through a 90-degree elbow and then heads EAST.
Starting from the n-th pump we have that the fluid makes a path equivalent to the trayectory of the 3x+1 sequence starting at n. (End)
		

Crossrefs

Cf. A347270 (all 3x+1 sequences).
Cf. Companion of A235801.

Programs

  • Mathematica
    LinearRecurrence[{0,2,0,-1},{3,1,7,2},70] (* Harvey P. Dale, Sep 29 2016 *)
  • Python
    from _future_ import division
    A235800_list = [4*(n//2) + 3 if n % 2 else n//2 for n in range(1,10**4)] # Chai Wah Wu, Sep 26 2016

Formula

a(n) = A006370(n) - A193356(n).
From Chai Wah Wu, Sep 26 2016: (Start)
a(n) = 2*a(n-2) - a(n-4) for n > 4.
G.f.: x*(x^2 + x + 3)/((x - 1)^2*(x + 1)^2). (End)

A047246 Numbers that are congruent to {0, 1, 2, 3} mod 6.

Original entry on oeis.org

0, 1, 2, 3, 6, 7, 8, 9, 12, 13, 14, 15, 18, 19, 20, 21, 24, 25, 26, 27, 30, 31, 32, 33, 36, 37, 38, 39, 42, 43, 44, 45, 48, 49, 50, 51, 54, 55, 56, 57, 60, 61, 62, 63, 66, 67, 68, 69, 72, 73, 74, 75, 78, 79, 80, 81, 84, 85, 86, 87, 90, 91, 92, 93, 96, 97, 98
Offset: 1

Views

Author

Keywords

Comments

The sequence is the interleaving of A047238 with A047241. - Guenther Schrack, Feb 12 2019

Crossrefs

Cf. A045331 (primes congruent to {1,2,3} mod 6), A047238, A047241.
Complement: A047257.

Programs

  • GAP
    Filtered([0..100],n->n mod 6 = 0 or n mod 6 = 1 or n mod 6 = 2 or n mod 6 = 3); # Muniru A Asiru, Feb 20 2019
  • Haskell
    a047246 n = a047246_list !! (n-1)
    a047246_list = [0..3] ++ map (+ 6) a047246_list
    -- Reinhard Zumkeller, Jan 15 2013
    
  • Magma
    [Floor((6/5)*Floor(5*(n-1)/4)) : n in [1..100]]; // Wesley Ivan Hurt, May 21 2016
    
  • Maple
    A047246:=n->(6*n-9-I^(2*n)-(1-I)*I^(-n)-(1+I)*I^n)/4: seq(A047246(n), n=1..100); # Wesley Ivan Hurt, May 21 2016
  • Mathematica
    Table[(6n-9-I^(2n)-(1-I)*I^(-n)-(1+I)*I^n)/4, {n, 80}] (* Wesley Ivan Hurt, May 21 2016 *)
  • PARI
    my(x='x+O('x^70)); concat([0], Vec(x^2*(1+x+x^2+3*x^3)/((1-x)*(1-x^4)))) \\ G. C. Greubel, Feb 16 2019
    
  • Sage
    a=(x^2*(1+x+x^2+3*x^3)/((1-x)*(1-x^4))).series(x, 72).coefficients(x, sparse=False); a[1:] # G. C. Greubel, Feb 16 2019
    

Formula

G.f.: x^2*(1+x+x^2+3*x^3) / ((1+x)*(1-x)^2*(1+x^2)). - R. J. Mathar, Oct 08 2011
a(n) = floor((6/5)*floor(5*(n-1)/4)). - Bruno Berselli, May 03 2016
From Wesley Ivan Hurt, May 21 2016: (Start)
a(n) = a(n-1) + a(n-4) - a(n-5) for n>5.
a(n) = (6*n - 9 - i^(2*n) - (1-i)*i^(-n) - (1+i)*i^n)/4 where i=sqrt(-1).
a(2*n) = A047241(n), a(2*n-1) = A047238(n). (End)
E.g.f.: (6 + sin(x) - cos(x) + (3*x - 4)*sinh(x) + (3*x - 5)*cosh(x))/2. - Ilya Gutkovskiy, May 21 2016
From Guenther Schrack, Feb 12 2019: (Start)
a(n) = (6*n - 9 - (-1)^n - 2*(-1)^(n*(n+1)/2))/4.
a(n) = a(n-4) + 6, a(1)=0, a(2)=1, a(3)=2, a(4)=3, for n > 4. (End)
Sum_{n>=2} (-1)^n/a(n) = Pi/(6*sqrt(3)) + 2*log(2)/3. - Amiram Eldar, Dec 16 2021
a(n)-a(n-1) = A093148(n-2). - R. J. Mathar, May 01 2024

Extensions

More terms from Wesley Ivan Hurt, May 21 2016

A047237 Numbers that are congruent to {0, 1, 2, 4} mod 6.

Original entry on oeis.org

0, 1, 2, 4, 6, 7, 8, 10, 12, 13, 14, 16, 18, 19, 20, 22, 24, 25, 26, 28, 30, 31, 32, 34, 36, 37, 38, 40, 42, 43, 44, 46, 48, 49, 50, 52, 54, 55, 56, 58, 60, 61, 62, 64, 66, 67, 68, 70, 72, 73, 74, 76, 78, 79, 80, 82, 84, 85, 86, 88, 90, 91, 92, 94, 96, 97
Offset: 1

Views

Author

Keywords

Comments

The sequence is the interleaving of A047238(n) with A016777(n-1). - Guenther Schrack, Feb 11 2019

Crossrefs

Programs

  • GAP
    Filtered([0..100],n->n mod 6 = 0 or n mod 6 = 1 or n mod 6 = 2 or n mod 6 = 4); # Muniru A Asiru, Feb 19 2019
  • Magma
    [n : n in [0..110] | n mod 6 in [0, 1, 2, 4]]; // G. C. Greubel, Feb 16 2019
    
  • Maple
    A047237:=n->(6*n-8+I^(1-n)-I^(1+n))/4: seq(A047237(n), n=1..100); # Wesley Ivan Hurt, May 21 2016
  • Mathematica
    Table[(6n-8+I^(1-n)-I^(1+n))/4, {n, 80}] (* Wesley Ivan Hurt, May 21 2016 *)
    LinearRecurrence[{2,-2,2,-1},{0,1,2,4},120] (* Harvey P. Dale, Jan 21 2018 *)
  • PARI
    my(x='x+O('x^70)); concat([0], Vec(x^2*(1+2*x^2)/((1+x^2)*(1-x)^2))) \\ G. C. Greubel, Feb 16 2019
    
  • Sage
    a=(x^2*(1+2*x^2)/((1+x^2)*(1-x)^2)).series(x, 72).coefficients(x, sparse=False); a[1:] # G. C. Greubel, Feb 16 2019
    

Formula

Starting (1, 2, 4, 6, ...) = partial sums of (1, 1, 2, 2, 1, 1, 2, 2, ...). - Gary W. Adamson, Jun 19 2008
G.f.: x^2*(1+2*x^2) / ((1+x^2)*(1-x)^2). - R. J. Mathar, Oct 08 2011
From Wesley Ivan Hurt, May 21 2016: (Start)
a(n) = 2*a(n-1) - 2*a(n-2) + 2*a(n-3) - a(n-4) for n>4.
a(n) = (6*n - 8 + i^(1-n) - i^(1+n))/4 where i=sqrt(-1).
a(2*n) = A016777(n-1), a(2*n-1) = A047238(n). (End)
From Guenther Schrack, Feb 11 2019: (Start)
a(n) = (6*n - 8 + (1 - (-1)^n)*(-1)^(n*(n-1)/2))/4.
a(n) = a(n-4) + 6, a(1)=0, a(2)=1, a(3)=2, a(4)=4, for n > 4.
a(-n) = -A047262(n+2).
a(n) = A118286(n-1)/2 for n > 1.
a(n) = A047255(n) - 1. (End)
Sum_{n>=2} (-1)^n/a(n) = sqrt(3)*Pi/36 + log(2)/3 + log(3)/4. - Amiram Eldar, Dec 16 2021

Extensions

More terms from Wesley Ivan Hurt, May 21 2016

A047269 Numbers that are congruent to {0, 1, 2, 5} mod 6.

Original entry on oeis.org

0, 1, 2, 5, 6, 7, 8, 11, 12, 13, 14, 17, 18, 19, 20, 23, 24, 25, 26, 29, 30, 31, 32, 35, 36, 37, 38, 41, 42, 43, 44, 47, 48, 49, 50, 53, 54, 55, 56, 59, 60, 61, 62, 65, 66, 67, 68, 71, 72, 73, 74, 77, 78, 79, 80, 83, 84, 85, 86, 89, 90, 91, 92, 95, 96, 97
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    I:=[0, 1, 2, 5, 6]; [n le 5 select I[n] else Self(n-1)+Self(n-4)-Self(n-5): n in [1..70]]; // Vincenzo Librandi, May 15 2012
    
  • Maple
    A047269:=n->(-7+(-1)^n+(1+I)*(-I)^n+(1-I)*I^n+6*n)/4: seq(A047269(n), n=1..100); # Wesley Ivan Hurt, May 22 2016
  • Mathematica
    Select[Range[0,4000], MemberQ[{0,1,2,5}, Mod[#,6]]&] (* Vincenzo Librandi, May 15 2012 *)
    LinearRecurrence[{1,0,0,1,-1},{0,1,2,5,6},80] (* Harvey P. Dale, Jun 21 2022 *)
  • PARI
    x='x+O('x^100); concat(0, Vec(x^2*(1+x+3*x^2+x^3)/((1-x)^2*(1+x)*(1+x^2)))) \\ Altug Alkan, Dec 24 2015

Formula

From Colin Barker, May 14 2012: (Start)
a(n) = (-7+(-1)^n+(1+i)*(-i)^n+(1-i)*i^n+6*n)/4 where i=sqrt(-1).
G.f.: x^2*(1+x+3*x^2+x^3)/((1-x)^2*(1+x)*(1+x^2)). (End)
a(n) = a(n-1) + a(n-4) - a(n-5) for n>5. - Vincenzo Librandi, May 15 2012
a(2n) = A007310(n), a(2n-1) = A047238(n). - Wesley Ivan Hurt, May 22 2016
Sum_{n>=2} (-1)^n/a(n) = log(3)/4 + 2*log(2)/3 - sqrt(3)*Pi/36. - Amiram Eldar, Dec 16 2021
a(n) = n - 1 + 2*floor(n/4). - Taras Goy, Jan 03 2025

A117794 Hexagonal numbers divisible by 6.

Original entry on oeis.org

0, 6, 66, 120, 276, 378, 630, 780, 1128, 1326, 1770, 2016, 2556, 2850, 3486, 3828, 4560, 4950, 5778, 6216, 7140, 7626, 8646, 9180, 10296, 10878, 12090, 12720, 14028, 14706, 16110, 16836, 18336, 19110, 20706, 21528, 23220, 24090, 25878, 26796
Offset: 1

Views

Author

Luc Stevens (lms022(AT)yahoo.com), Apr 29 2006

Keywords

Comments

Intersection of A000384 and A008588. Their indices are given by A047238. - Michel Marcus, Feb 27 2014

Crossrefs

Programs

  • Mathematica
    Select[Table[n(2n-1),{n,0,250}],Divisible[#,6]&] (* or *) LinearRecurrence[ {1,2,-2,-1,1},{0,6,66,120,276},84] (* Harvey P. Dale, Aug 19 2011 *)
  • PARI
    isok(n) = ispolygonal(n, 6) && !(n % 6); \\ Michel Marcus, Feb 27 2014

Formula

a(n) = a(n-1)+2*a(n-2)-2*a(n-3)-a(n-4)+a(n-5), with a(1)=0, a(2)=6, a(3)=66, a(4)=120, a(5)=276. - Harvey P. Dale, Aug 19 2011
a(n) = 3/2*(-1)^n(-4 n+(-1)^n*(6*n(2*n-5)+19)+5). - Harvey P. Dale, Aug 19 2011
G.f.: 6*x^2*(1+10*x+7*x^2+6*x^3)/((1-x)^3*(1+x)^2). - Harvey P. Dale, Aug 19 2011

A229488 Conjecturally, possible differences between prime(k)^2 and the previous prime for some k.

Original entry on oeis.org

1, 2, 6, 8, 12, 14, 18, 20, 24, 26, 30, 32, 38, 42, 44, 48, 50, 54, 56, 60, 62, 66, 68, 72, 74, 78, 80, 84, 86, 90, 92, 96, 98, 102, 104, 108, 110, 114, 116, 120, 122, 126, 128, 132, 134, 138, 140, 146, 150, 152, 156, 158, 162, 164, 168, 170, 174, 176, 180
Offset: 1

Views

Author

T. D. Noe, Oct 21 2013

Keywords

Comments

Are there any missing terms? The first 10^7 primes were examined. All these differences occur for some k < 10^5. Note that the first differences of these terms is 1, 2, 4, or 6.
From R. J. Mathar, Oct 29 2013: (Start)
This sequence of possible differences d= prime(k)^2 -q looks similar to A047238; 1 is an exception associated with the single even prime, 1=2^2-3.
[Reason: Otherwise primes are odd, squared primes are also odd, so the differences are even and therefore in the class {0,2,4} mod 6.
Furthermore primes are of the form 3n+1 or 3n+2, squared primes are of the form 9n^2+6n+1 or 9n^2+12n+4, so squared primes are of the form ==1 (mod 3).
The difference prime(k)^2-q is therefore the difference between a number ==1 (mod 3) and a number == {1,2} (mod 3) and therefore a number == {0,2} mod 3. This is never of the form 6n+4 ( == 1 mod 3). So the differences are in the class {0,2} mod 6, demonstrating that this is essentially a subsequence of A047238.]
Furthermore, differences 36, 144, 324,... of the form (6n)^2, A016910, appear in A047238 but not here, because prime(k)^2 -q=(6n)^2 is equivalent to prime(k)^2-(6n)^2 =q =(prime(k)+6n)*(prime(k)-6n), which requires an explicit factorization of the prime q. This is a contradiction if we assure that prime(k)-6n is not equal 1; if we scanned explicitly all primes up to prime(k)=10^7, for example, all (6n)^2 up to 6n<=10^7 are proved not to be in the sequence. (End)

Crossrefs

Cf. A000040 (primes), A001248 (primes squared).
Cf. A004277 (conjecturally, possible gaps between adjacent primes).
Cf. A054270 (prime below prime(n)^2).
Cf. A229489 (possible differences between prime(k)^2 and the next prime).

Programs

  • Mathematica
    t = Table[p2 = Prime[k]^2; p2 - NextPrime[p2, -1], {k, 100000}]; Take[Union[t], 60]
Showing 1-10 of 14 results. Next