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.

Previous Showing 31-40 of 66 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

A001533 a(n) = (8*n+1)*(8*n+7).

Original entry on oeis.org

7, 135, 391, 775, 1287, 1927, 2695, 3591, 4615, 5767, 7047, 8455, 9991, 11655, 13447, 15367, 17415, 19591, 21895, 24327, 26887, 29575, 32391, 35335, 38407, 41607, 44935, 48391, 51975, 55687, 59527, 63495, 67591, 71815, 76167, 80647, 85255, 89991, 94855, 99847, 104967
Offset: 0

Views

Author

Keywords

Comments

From Klaus Purath, Aug 18 2022: (Start)
This is A028560(8*n+1), and thus a(n) + 9 is a square. (See formulas)
7 is the only prime number of this sequence in which all odd prime factors occur.
Each prime factor p appears exactly twice in any interval of p consecutive terms. If a(m) and a(n) are within such an interval containing p, then m + n == -1 (mod p). (End)

Crossrefs

Programs

Formula

a(n) = 4*A001539(n) - 5.
a(n) = 128*n + a(n-1) with a(0)=7. - Vincenzo Librandi, Nov 12 2010
Sum_{n>=0} 1/a(n) = (Psi(7/8)-Psi(1/8))/48 = 0.1580099..., see A250129. - R. J. Mathar, May 30 2022 [ = (sqrt(2)+1)*Pi/48. - Amiram Eldar, Sep 08 2022]
From Klaus Purath, Aug 18 2022: (Start)
a(n) = A028560(8*n+1).
a(n) + 9 = ((a(n+1) - a(n-1))/32)^2 = A017113(n)^2.
a(2*n) = (a(n+1) - a(n-1))*n + 7. (End)
From Amiram Eldar, Feb 19 2023: (Start)
a(n) = A017077(n)*A004771(n).
Sum_{n>=0} (-1)^n/a(n) = (cos(Pi/8) * log(cot(Pi/16)) + sin(Pi/8) * log(cot(3*Pi/16)))/12.
Product_{n>=0} (1 - 1/a(n)) = cosec(Pi/8)*cos(sqrt(5/2)*Pi/4).
Product_{n>=0} (1 + 1/a(n)) = cosec(Pi/8)*cos(sqrt(2)*Pi/4). (End)
G.f.: -(7+114*x+7*x^2)/(x-1)^3. - R. J. Mathar, Apr 23 2024
From Elmo R. Oliveira, Oct 25 2024: (Start)
E.g.f.: exp(x)*(7 + 64*x*(2 + x)).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 2. (End)

A031915 a(n) = prime(8*n - 7).

Original entry on oeis.org

2, 23, 59, 97, 137, 179, 227, 269, 313, 367, 419, 461, 509, 571, 617, 661, 727, 773, 829, 883, 947, 1009, 1051, 1103, 1171, 1229, 1289, 1327, 1427, 1471, 1523, 1579, 1621, 1697, 1753, 1823, 1879, 1951, 2011, 2081, 2131, 2207, 2269, 2333, 2381
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [ NthPrime(8*n-7): n in [1..1000] ]; // Vincenzo Librandi, Apr 09 2011
    
  • Mathematica
    Prime[8*Range[60]-7] (* G. C. Greubel, Feb 18 2024 *)
  • SageMath
    [nth_prime(8*n-7) for n in range(1,61)] # G. C. Greubel, Feb 18 2024

Formula

a(n) = prime(A017077(n-1)). - Michel Marcus, Aug 07 2021

A081593 Third row of Pascal-(1,7,1) array A081582.

Original entry on oeis.org

1, 17, 97, 241, 449, 721, 1057, 1457, 1921, 2449, 3041, 3697, 4417, 5201, 6049, 6961, 7937, 8977, 10081, 11249, 12481, 13777, 15137, 16561, 18049, 19601, 21217, 22897, 24641, 26449, 28321, 30257, 32257, 34321, 36449, 38641, 40897, 43217, 45601, 48049, 50561, 53137
Offset: 0

Views

Author

Paul Barry, Mar 23 2003

Keywords

Crossrefs

Programs

Formula

a(n) = 1 - 16*n + 32*n^2.
G.f.: (1+7*x)^2/(1-x)^3.
From Elmo R. Oliveira, Jun 09 2025: (Start)
E.g.f.: exp(x)*(1 + 16*x + 32*x^2).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). (End)

A106840 Numbers m such that both m and m+1 have odd part of the form 4*k+1.

Original entry on oeis.org

1, 4, 8, 9, 16, 17, 20, 25, 32, 33, 36, 40, 41, 49, 52, 57, 64, 65, 68, 72, 73, 80, 81, 84, 89, 97, 100, 104, 105, 113, 116, 121, 128, 129, 132, 136, 137, 144, 145, 148, 153, 160, 161, 164, 168, 169, 177, 180, 185, 193, 196, 200, 201, 208, 209, 212, 217, 225
Offset: 1

Views

Author

Ralf Stephan, May 03 2005

Keywords

Comments

From Amiram Eldar, Sep 14 2024: (Start)
Disjoint union of A017077 and {4*A091072(n)}.
The asymptotic density of this sequence is 1/4. (End)

Examples

			20/4 = 5 == 1 (mod 4) and also 21 == 1 (mod 4), therefore 20 is in the sequence.
		

Crossrefs

Contains A106841 and A106841+1.

Programs

  • Mathematica
    f[n_] := Mod[n / 2^IntegerExponent[n, 2] - 1, 4]; SequencePosition[Array[f, 250], {0, 0}][[;;,1]] (* Amiram Eldar, Sep 14 2024 *)

A139405 Numbers k such that 8*k+1 and 8*k+7 are primes.

Original entry on oeis.org

2, 5, 9, 12, 24, 29, 32, 44, 54, 57, 74, 75, 80, 107, 110, 122, 129, 137, 152, 162, 165, 170, 179, 185, 194, 200, 207, 219, 222, 234, 249, 260, 267, 285, 297, 299, 302, 305, 332, 339, 362, 414, 432, 452, 470, 500, 509, 519, 555, 557, 564, 570, 582, 584, 599
Offset: 1

Views

Author

Artur Jasinski, Apr 19 2008

Keywords

Crossrefs

Programs

  • Mathematica
    a = {}; Do[If[PrimeQ[8 n + 1] && PrimeQ[8 n + 7], AppendTo[a, n]], {n, 1, 1000}]; a

A141124 Hankel transform of a transform of Jacobsthal numbers.

Original entry on oeis.org

1, 5, -9, -9, 17, 13, -25, -17, 33, 21, -41, -25, 49, 29, -57, -33, 65, 37, -73, -41, 81, 45, -89, -49, 97, 53, -105, -57, 113, 61, -121, -65, 129, 69, -137, -73, 145, 77, -153, -81, 161, 85, -169, -89, 177, 93, -185, -97, 193, 101, -201
Offset: 0

Views

Author

Paul Barry, Jun 05 2008

Keywords

Comments

Hankel transform of A100096(n+1).

Crossrefs

Cf. A017077 (unsigned bisection), A016813 (unsigned bisection).

Formula

G.f.: (1+5x-7x^2+x^3)/(1+2x^2+x^4); a(n)=(4n+1)*cos(pi*n/2)+(2n+3)*sin(pi*n/2);

A194002 Numbers k that are the start of a sequence of 7 maximally-squarefree numbers.

Original entry on oeis.org

1, 65, 137, 209, 217, 281, 353, 433, 641, 713, 785, 793, 857, 937, 1001, 1217, 1289, 1361, 1433, 1505, 1577, 1657, 1793, 1865, 1937, 2081, 2089, 2233, 2305, 2377, 2441, 2513, 2585, 2665, 2729, 2801, 2953, 3017, 3089, 3161, 3241, 3305, 3313, 3457, 3529, 3593
Offset: 1

Views

Author

Keywords

Comments

k, k+1, k+2, k+4, k+5, and k+6 are squarefree; k+3 is divisible by 4 but no higher power of 2 and no other prime squared.
From Amiram Eldar, Nov 28 2023: (Start)
All the terms are of the form 8*k + 1.
The numbers of terms not exceeding 10^k for k = 1, 2, ... , are 1, 2, 14, 140, 1384, 13774, 137784, 1378053, 13779491, 137794128, 1377940943, ... . Apparently, the asymptotic density of this sequence exists and equals 0.0137794... . (End)

Crossrefs

Subsequence of A005117, A007674, A007675 and A017077.

Programs

  • Mathematica
    sfQ[n_]:=Module[{c4=FactorInteger[n[[4]]],r=Drop[n,{4}]},First[c4] == {2,2} && Max[Transpose[Rest[c4]][[2]]]==1&&And@@SquareFreeQ/@r]; Join[{1}, Transpose[ Select[Partition[Range[2,3600],7,1],sfQ]][[1]]] (* Harvey P. Dale, Nov 22 2011 *)
  • PARI
    ap(n)={forstep(k=1,n,8,
    if(issquarefree(k)&&issquarefree(k+1)&&issquarefree(k+2)&&
       issquarefree((k+3)\2)&&
       issquarefree(k+4)&&issquarefree(k+5)&&issquarefree(k+6),
      print1(k", ")))}

A204675 a(n) = 16*n^2 + 2*n + 1.

Original entry on oeis.org

1, 19, 69, 151, 265, 411, 589, 799, 1041, 1315, 1621, 1959, 2329, 2731, 3165, 3631, 4129, 4659, 5221, 5815, 6441, 7099, 7789, 8511, 9265, 10051, 10869, 11719, 12601, 13515, 14461, 15439, 16449, 17491, 18565, 19671, 20809, 21979, 23181, 24415, 25681, 26979
Offset: 0

Views

Author

Reinhard Zumkeller, Jan 18 2012

Keywords

Comments

Central terms of the triangle A033293.
Also sequence found by reading the line from 1, in the direction 1, 19, ... in the square spiral whose vertices are the generalized decagonal numbers A074377. - Omar E. Pol, Nov 02 2012

Crossrefs

Programs

  • Haskell
    a204675 n = 2 * n * (8 * n + 1) + 1
    
  • Magma
    I:=[1, 19, 69]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+Self(n-3): n in [1..40]]; // Vincenzo Librandi, Mar 19 2012
    
  • Mathematica
    CoefficientList[Series[(1+x)*(1+15*x)/(1-x)^3,{x,0,50}],x] (* or *) LinearRecurrence[{3, -3, 1}, {1, 19, 69}, 50] (* Vincenzo Librandi, Mar 19 2012 *)
  • PARI
    a(n)=16*n^2+2*n+1 \\ Charles R Greathouse IV, Jun 17 2017

Formula

G.f.: (1+x)*(1+15*x)/(1-x)^3. - Bruno Berselli, Jan 18 2012
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - Wesley Ivan Hurt, Jun 09 2023
E.g.f.: exp(x)*(1 + 2*x*(9 + 8*x)). - Elmo R. Oliveira, Oct 18 2024

A278480 Number of neighbors of the n-th term in a full right triangle read by rows.

Original entry on oeis.org

2, 4, 5, 5, 7, 5, 5, 8, 7, 5, 5, 8, 8, 7, 5, 5, 8, 8, 8, 7, 5, 5, 8, 8, 8, 8, 7, 5, 5, 8, 8, 8, 8, 8, 7, 5, 5, 8, 8, 8, 8, 8, 8, 7, 5, 5, 8, 8, 8, 8, 8, 8, 8, 7, 5, 5, 8, 8, 8, 8, 8, 8, 8, 8, 7, 5, 5, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 5, 5, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 5, 5, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 5
Offset: 1

Views

Author

Omar E. Pol, Nov 23 2016

Keywords

Comments

Apart from the first column and the first two diagonals, the rest of the elements are 8's.
For the same idea but for an isosceles triangle see A278481; for a square array see A278545, for a square spiral see A010731; and for a hexagonal spiral see A010722.

Examples

			The sequence written as a right triangle begins:
2;
4, 5;
5, 7, 5;
5, 8, 7, 5;
5, 8, 8, 7, 5;
5, 8, 8, 8, 7, 5;
5, 8, 8, 8, 8, 7, 5;
5, 8, 8, 8, 8, 8, 7, 5;
5, 8, 8, 8, 8, 8, 8, 7, 5;
5, 8, 8, 8, 8, 8, 8, 8, 7, 5;
...
		

Crossrefs

Row sums give 2 together with the elements > 1 of A017077.
Also, row sums give 2 together with A004768.
Previous Showing 31-40 of 66 results. Next