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 91-100 of 102 results. Next

A250291 Numbers k such that (2^k+1)/3 is a semiprime.

Original entry on oeis.org

29, 37, 41, 47, 49, 53, 67, 71, 73, 103, 107, 109, 139, 151, 179, 223, 229, 251, 269, 277, 311, 349, 353, 433, 457, 487, 503, 599, 601, 613, 619, 643, 739, 757, 827, 839, 1031, 1061, 1117, 1123, 1217
Offset: 1

Views

Author

Eric Chen, Dec 24 2014

Keywords

Comments

If (2^k+1)/3 is a semiprime, k must be prime or the square of a prime; the only known square of a prime in this sequence is 49.
a(42) >= 1259.

Examples

			a(1) = 29 so (2^29+1)/3 = 178956971 = 59 * 3033169 is a semiprime.
		

Crossrefs

Extensions

a(40)-a(41) from Max Alekseyev, Feb 25 2025

A297180 a(n) is the smallest positive integer of length (distance from origin) n in the Cayley graph of the integers generated by all powers of 7.

Original entry on oeis.org

1, 2, 3, 4, 11, 18, 25, 74, 123, 172, 515, 858, 1201, 3602, 6003, 8404, 25211, 42018, 58825, 176474, 294123, 411772, 1235315, 2058858, 2882401, 8647202, 14412003, 20176804, 60530411, 100884018, 141237625, 423712874, 706188123, 988663372, 2965990115, 4943316858
Offset: 1

Views

Author

N. J. A. Sloane, Dec 28 2017

Keywords

Crossrefs

Cf. A007583, A007051, A294566, A297181, A297182 for the sequences obtained if "7" is replaced by a different prime.

Formula

Conjectures from Colin Barker, Dec 28 2017: (Start)
G.f.: x*(1 + x + x^2 - 6*x^3) / ((1 - x)*(1 - 7*x^3)).
a(n) = a(n-1) + 7*a(n-3) - 7*a(n-4) for n>4.
(End)
The second conjecture by Colin Barker is true up to n=1000. - Lars Blomberg, Dec 29 2017

Extensions

Terms a(21) and beyond from Lars Blomberg, Dec 29 2017

A306696 Lexicographically earliest sequence of nonnegative terms such that for any n > 0 and k > 0, if a(n) >= a(n+k), then a(n+2*k) <> a(n+k).

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 2, 0, 2, 1, 3, 1, 2, 2, 3, 0, 3, 2, 4, 1, 3, 3, 4, 1, 4, 2, 5, 2, 4, 3, 5, 0, 5, 3, 6, 2, 4, 4, 6, 1, 5, 3, 7, 3, 5, 4, 6, 1, 6, 4, 7, 2, 5, 5, 7, 2, 6, 4, 8, 3, 6, 5, 7, 0, 7, 5, 8, 3, 6, 6, 8, 2, 7, 4, 9, 4, 7, 6, 8, 1, 8, 5, 9, 3, 7, 7, 9
Offset: 1

Views

Author

Rémy Sigrist, Mar 05 2019

Keywords

Comments

This sequence has graphical features in common with A286326.

Examples

			For n=1:
- a(1) = 0 is suitable.
For n=2:
- a(2) = 0 is suitable.
For n=3:
- a(1) = 0 >= a(2) = 0, so a(3) <> 0,
- a(3) = 1 is suitable.
For n=4:
- a(2) = 0 < a(3) = 1,
- a(4) = 0 is suitable.
For n=5:
- a(3) = 1 >= a(4) = 0, so a(5) <> 0,
- a(1) = 0 < a(3) = 1,
- a(5) = 1 is suitable.
For n=6:
- a(4) = 0 < a(5) = 1,
- a(2) = 0 >= a(4) = 0, so a(6) <> 0,
- a(6) = 1 is suitable.
For n=7:
- a(5) = 1 >= a(6) = 1, so a(7) <> 1,
- a(3) = 1 >= a(5) = 1, so a(7) <> 1,
- a(1) = 0 >= a(4) = 0, so a(7) <> 0,
- a(7) = 2 is suitable.
		

Crossrefs

Formula

Empirically:
- a(n) = 0 iff n is a power of 2 (A000079),
- a(n) = 1 iff n = 3 or belongs to A164095,
- a(2*n) = a(n),
- A181497(n) is the least k such that a(k) = n.

A318236 a(n) = (3*2^(4*n+3) + 1)/5.

Original entry on oeis.org

5, 77, 1229, 19661, 314573, 5033165, 80530637, 1288490189, 20615843021, 329853488333, 5277655813325, 84442493013197, 1351079888211149, 21617278211378381, 345876451382054093, 5534023222112865485, 88544371553805847757, 1416709944860893564109, 22667359117774297025741
Offset: 0

Views

Author

Jianing Song, Aug 21 2018

Keywords

Comments

a(n) is the smallest positive multiplicative inverse of 5 modulo 2^(4*n+3).
In binary, a(n) is written as 10011001...1001101 where "1001" appears n times. When n approaches infinity we get the 2-adic expansion of 1/5: ...10011001101. Similarly, the 2-adic expansion of 1/3 is ...101010101011.

Examples

			The smallest solution to 5*x == 1 (mod 8) is x = (3*2^3 + 1)/5 = 5.
The smallest solution to 5*x == 1 (mod 128) is x = (3*2^7 + 1)/5 = 77.
		

Crossrefs

A007583 gives the smallest positive multiplicative inverse of 3 modulo 2^(2*n) and 2^(2*n+1), A299960 gives the smallest positive multiplicative inverse of 5 modulo 2^(4*n), 2^(4*n+1) and 2^(4*n+2).

Programs

  • Magma
    [(3*2^(4*n + 3) + 1)/5: n in [0..20]]; // Vincenzo Librandi, Aug 24 2018
    
  • Mathematica
    Table[(3 2^(4 n + 3) + 1) / 5, {n, 0, 20}] (* Vincenzo Librandi, Aug 24 2018 *)
    LinearRecurrence[{17,-16},{5,77},20] (* Harvey P. Dale, Sep 25 2020 *)
  • PARI
    a(n) = (3*2^(4*n + 3) + 1)/5
    
  • Python
    def A318236(n): return (3*(1<<(n<<2)+3)+1)//5 # Chai Wah Wu, Jul 29 2022

Formula

O.g.f.: (5 - 8*x)/((1 - x)*(1 - 16*x)).
E.g.f.: (24*exp(16*x) + exp(x))/5.
a(0) = 5, a(1) = 77; for n>1, a(n) = 17*a(n-1) - 16*a(n-2).

A334638 Three-column array pPT read by rows: subsequence of primitive Pythagorean triples (x, y, z) with x = A153893^2 - A000079^2, y = 2*A153893*A000079, z = A153893^2 + A000079^2, ordered by increasing z.

Original entry on oeis.org

3, 4, 5, 21, 20, 29, 105, 88, 137, 465, 368, 593, 1953, 1504, 2465, 8001, 6080, 10049, 32385, 24448, 40577, 130305, 98048, 163073, 522753, 392704, 653825, 2094081, 1571840, 2618369, 8382465, 6289408, 10479617, 33542145, 25161728, 41930753, 134193153, 100655104, 167747585, 536821761, 402636800, 671039489, 2147385345, 1610579968, 2684256257
Offset: 0

Views

Author

Ralf Steiner, May 07 2020

Keywords

Comments

Let [h21] = {{1, 3}, {0, 2}} be the matrix [h_2]*[h_1] in Firstov's notation, from eqs. (24) and (39). Then primitive Pythagorean triples (pPT) (x(n), y(n), z(n)) = (u(n)^2 - v(n)^2, 2*u(n)*v(n), u(n)^2 + v(n)^2), with u(n) and v(n) of different parity, gcd(u(n), v(n)) = 1, and u(n) > v(n) > 0, are generated by (u(n), v(n))^T = [h21]^n*(2,1)^T (T for transpose).
For n > 0: (x(n), y(n), z(n)) = (1, 0, 1) (mod 4). Thus some z are Pythagorean primes (A002144).
The triples converge to the proportion (4:3:5) with:
lim_{n->infinity} x(n)/y(n) = 4/3, lim_{n->infinity} y(n)/z(n) = 3/5.
Altitude h(n) = x(n)*y(n)/z(n) is an irreducible fraction because of primitivity.
From Wolfdieter Lang, Jun 13 2020: (Start)
[h21]^n = sqrt(2)^n*(S(n, 3/sqrt(2))*[1_3] + S(n-1, 3/sqrt(2))*(1/sqrt(2))*([h21] - 3*[1_3])) with the Chebyshev S polynomials (A049310).
u(n) = sqrt(2)^n*(2*S(n, 3/sqrt(2)) - (1/sqrt(2))*S(n-1, 3/sqrt(2)))
= A153893(n),
v(n) = sqrt(2)^n*(S(n, 3/sqrt(2)) - (1/sqrt(2))*S(n-1, 3/sqrt(2)))
= A000079(n). Proof from the recurrence, using the Cayley-Hamilton theorem.
With the monic Chebyshev T polynomials, called R in A127672:
x(n)/3 = 2^(n+1)*(R(2*(n+1), 3/sqrt(2)) - (sqrt(2)/3)*R(2*n+1,3/sqrt(2)) - 1) = A171477(n),
y(n)/4 = 3*2^(n-1)*(sqrt(2)*R(2*n+1,3/sqrt(2)) - R(2*n,3/sqrt(2)) - 1/3)
= A010036(n),
z(n) = 3*2^(n+1)*((3/sqrt(2))*R(2*n+1, 3/sqrt(2)) - (4/3)*R(2*n,3/sqrt(2)) - 1).
Using 2^n*Rnx(2*n, 3/sqrt(2)) = A052539(n) = 2^(2*n) + 1, and
2^(n)*(sqrt(2)/3)*Rnx(2*n+1, 3/sqrt(2)) = A007583(n) = (2^(2*n + 1) + 1)/3,
produces the explicit formulas given by the author in the formula section.
G.f.s for {x(n)} G0(x) = 3/((1 - 4*x)*(1 - 2*x)*(1 - x)), for {y(n)} G1(x) = 4*(1-x)/((1 - 4*x)*(1 - 2*x)), and for {z(n)} = (5 - 6*x + 4*x^2)/((1 - 4*x)*(1 - 2*x)*(1 - x)). This produces the g.f. for the array, read as sequence {a(n)}: G(x) = G0(x^3) + x*G1(x^3) + x^2*G2(x^3) given in the formula section by Colin Barker.
(End)

Examples

			The three-column array pPT(n,k) begins:
n\k        0        1         2
-------------------------------
0:         3        4         5
1:        21       20        29
2:       105       88       137
3:       465      368       593
4:      1953     1504      2465
5:      8001     6080     10049
6:     32385    24448     40577
7:    130305    98048    163073
8:    522753   392704    653825
9:   2094081  1571840   2618369
10:  8382465  6289408  10479617
... - _Wolfdieter Lang_, Jun 13 2020
		

Crossrefs

Programs

  • Mathematica
    h21={{1, 3}, {0, 2}}; l = {}; Do[v = MatrixPower[h21, n, {2, 1}]; p = v[[1]]; q = v[[2]];
    a = p^2 - q^2; b = 2 p q; c = p^2 + q^2; l = AppendTo[l, {a, b, c}], {n, 0, 14}]; l // Flatten
  • PARI
    Vec((3 + 4*x + 5*x^2 - 8*x^4 - 6*x^5 + 4*x^7 + 4*x^8) / ((1 - x)*(1 + x + x^2)*(1 - 2*x^3)*(1 - 4*x^3)) + O(x^35)) \\ Colin Barker, Jun 12 2020

Formula

The three-column array PT(n, k) is for k = 0, 1, 2: x(n), y(n), z(n), for n >= 0, with
x(n) = a(3*n + 0) = A153893(n)^2 - A000079(n)^2 = 1 - 3*2^(n+1) + 2^(2*n+3) = binomial(2^(n+2) - 1, 2) = 3*A171477(n),
y(n) = a(3*n + 1) = 2*A153893(n)*A000079(n) = 2^(n+1)*(-1 + 3*2^n) = 4*A010036(n),
z(n) = a(3*n + 2) = A153893(n)^2 + A000079(n)^2 = 1 - 6*2^n + 10*2^(2*n).
From Colin Barker, May 08 2020: (Start)
G.f. (read as sequence {a(n)}): (3 + 4*x + 5*x^2 - 8*x^4 - 6*x^5 + 4*x^7 + 4*x^8) / ((1 - x)*(1 + x + x^2)*(1 - 2*x^3)*(1 - 4*x^3)).
a(n) = 7*a(n-3) - 14*a(n-6) + 8*a(n-9), for n > 8.
(End)

Extensions

Edited, and corrected proportion by Wolfdieter Lang, Jun 13 2020
Minor grammatical edits. - N. J. A. Sloane, Sep 12 2020

A364213 The number of trailing 0's in the canonical representation of n as a sum of distinct Jacobsthal numbers (A280049).

Original entry on oeis.org

0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 4, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 4, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 6, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 4, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 4, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0
Offset: 1

Views

Author

Amiram Eldar, Jul 14 2023

Keywords

Comments

The even terms of A007583.
This sequence is unbounded. The first position of 2*k is A007583(k) = (2^(2*k+1) + 1)/3.
The asymptotic density of the occurrences of (2*k) in this sequence is 3/4^(k+1).
The asymptotic mean of this sequence is 2/3 and its asymptotic standard deviation is 4/3.

Crossrefs

Programs

  • Mathematica
    Select[IntegerExponent[Range[100], 2], EvenQ]
  • PARI
    select(x->!(x%2), vector(100, i, valuation(i, 2)))

Formula

a(n) = A122840(A280049(n)).
a(n) = A007583(A003159(n)).

A101480 E.g.f. (1/cosh(x)+tanh(x))*(exp(2*x)-exp(-x))/3.

Original entry on oeis.org

0, 1, 3, 3, 3, 11, 63, 43, -837, 171, 34023, 683, -1800477, 2731, 132912783, 10923, -12927652917, 43691, 1603253204343, 174763, -246914125142157, 699051, 46232582930156703, 2796203, -10343022775699132197, 11184811, 2724715006195438297863, 44739243, -834839760935753154167037
Offset: 0

Views

Author

Paul Barry, Jan 21 2005

Keywords

Comments

A transform of the Jacobsthal numbers.
a(2n)=A007583(n)=(2*4^n+1)/3.

Crossrefs

Programs

  • Mathematica
    With[{nn=30},CoefficientList[Series[(1/Cosh[x]+Tanh[x]) (Exp[2x]- Exp[-x])/3, {x,0,nn}],x]Range[0,nn]!] (* Harvey P. Dale, Aug 22 2012 *)

Extensions

Corrected by N. J. A. Sloane, Nov 05 2005

A174736 Number of nodes with index 2^2k in a dyadic tree build alternatively with the schema "l" between the index 2^2k and 2^(2k+1) - 1, and the schema "^" between the index 2^(2k+1) and 2^(2k+2) - 1.

Original entry on oeis.org

2, 8, 2048, 8796093022208, 2993155353253689176481146537402947624255349848014848
Offset: 1

Views

Author

Michel Lagneau, Mar 28 2010

Keywords

Comments

This tree represent the set of the interval [0,1], and the number of nodes of rank n is a(n). The number nodes with index 2^2k is a(2^2k) = (2^(2k+1) + 1)/3= 2^A007583.
Proof :
Let n(k) such that a(2^2k) = 2^n(k). By recurrence we have n(k) = 2^2k - 2^2k-1 + n(k-1) = 2^2k-1 + n(k-1). With n(1) = 3 = 2+1 we obtain : n(k) = 1 + 2(1 + 2^2 + ... + 2^(2k-2)) = (2^(2k+1) + 1)/3.
Graphic representation :
0....................^
1............l.................l
2............^.................^
3.......^........^........^........^
4.....l...l... l...l... l...l... l...l
5.....l...l... l...l... l...l... l...l
6.....l...l... l...l... l...l... l...l
7.....l...l... l...l... l...l... l...l
8.....^...^... ^...^... ^...^... ^...^
9....^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
10..^^^^^^^^ ^^^^^^^^ ^^^^^^^^ ^^^^^^^^

Examples

			k=0, a(1) = 2 ; k=1, a(4) = 8 ; k=2, a(16) = 2048 ; k=3, a(64) = 2^43 = 8796093022208.
		

References

  • J. E. Hutchinson, Fractal and self-similarity, Ind. U. Math. J. 30 (1981), 713-747.

Programs

  • Maple
    for n from 0 to 5 do: p:=(2*4^n + 1)/3:q:=2^p:print(q):od:

Formula

a(2^2k) = 2^A007583.

A340547 Square array, read by ascending antidiagonals, where row n gives all solutions n > 0 to A000120(n+1) = A000120((n+1)*k), A000120 is the Hamming weight.

Original entry on oeis.org

1, 1, 2, 1, 2, 4, 1, 2, 3, 8, 1, 2, 4, 4, 16, 1, 2, 4, 8, 6, 32, 1, 2, 3, 8, 16, 8, 64, 1, 2, 3, 4, 13, 32, 11, 128, 1, 2, 4, 4, 6, 16, 64, 12, 256, 1, 2, 2, 8, 5, 8, 26, 128, 16, 512, 1, 2, 4, 8, 16, 6, 11, 32, 256, 22, 1024
Offset: 1

Views

Author

Thomas Scheuerle, Jan 11 2021

Keywords

Comments

Solutions to related equation A000120(k) = A000120(k*n) are A340351.
The same sequence without leading ones and only odd solutions is A340441.

Examples

			Eight initial terms of rows 1-8 are listed below:
   1: 1, 2, 4, 8, 16, 32, 64, 128, ...
   2: 1, 2, 3, 4,  6,  8, 11,  12, ...
   3: 1, 2, 4, 8, 16, 32, 64, 128, ...
   4: 1, 2, 4, 8, 13, 16, 26,  32, ...
   5: 1, 2, 3, 4,  6,  8, 11,  12, ...
   6: 1, 2, 3, 4,  5,  6,  7,   8, ...
   7: 1, 2, 4, 8, 16, 32, 64, 128, ...
   8: 1, 2, 4, 8, 16, 32, 57,  64, ...
T(3,4) = 8 because: (3+1) in binary is 100 and (3*1)*8 = 32 in binary is 100000, both have 1 bit set to 1.
		

Crossrefs

Cf. A263132 (superset of 1st row), A007583 (1st row), A299960 (2nd row).

Formula

T(2n, ...) = 2^{0,1,2,...}, 2^{0,1,2,...} * row n of A340441.
T(4n+1, ...) = 2^{0,1,2,...}, 2^{0,1,2,...} * row n of A340441.
T(2^n, ...) = 2^{0,1,2,...}.

A349890 Triangle read by rows: T(n,k) = n * 2^e(n) - (4^e(n) - 1) / 3 - k * (k - 1) / 2 with e(n) = 1 + floor(log_2(n)) for n >= 1 and 1 <= k <= n.

Original entry on oeis.org

1, 3, 2, 7, 6, 4, 11, 10, 8, 5, 19, 18, 16, 13, 9, 27, 26, 24, 21, 17, 12, 35, 34, 32, 29, 25, 20, 14, 43, 42, 40, 37, 33, 28, 22, 15, 59, 58, 56, 53, 49, 44, 38, 31, 23, 75, 74, 72, 69, 65, 60, 54, 47, 39, 30, 91, 90, 88, 85, 81, 76, 70, 63, 55, 46, 36, 107, 106, 104, 101, 97, 92, 86, 79, 71, 62, 52, 41
Offset: 1

Views

Author

Werner Schulte, Dec 04 2021

Keywords

Comments

Conjecture: The terms of the triangle yield a permutation of the positive integers (A000027).

Examples

			The triangle T(n, k) for 1 <= k <= n begins:
n\k:   1   2   3   4   5   6   7   8   9  10  11
================================================
01 :   1
02 :   3   2
03 :   7   6   4
04 :  11  10   8   5
05 :  19  18  16  13   9
06 :  27  26  24  21  17  12
07 :  35  34  32  29  25  20  14
08 :  43  42  40  37  33  28  22  15
09 :  59  58  56  53  49  44  38  31  23
10 :  75  74  72  69  65  60  54  47  39  30
11 :  91  90  88  85  81  76  70  63  55  46  36
etc.
		

Crossrefs

Programs

  • PARI
    T(n,k) = my(e=1+logint(n,2)); n*2^e - (4^e-1)/3 - k*(k-1)/2;
    row(n) = vector(n, k, T(n,k)); \\ Michel Marcus, Dec 05 2021

Formula

T(2^n, 1) = A007583(n) for n >= 0.
T(n, 1) - T(n, n) = A000217(n-1) for n > 0.
T(n, k) = T(n-1, k) + T(n-1, k-1) - T(n-1-2^(e(n-1)-e(n-2)), k-1) with e(n) = 1 + floor(log_2(n)) for n > 3 and 1 < k < n-1 (conjectured).
Previous Showing 91-100 of 102 results. Next