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

A057719 Prime factors of numbers in A006521 (numbers k that divide 2^k + 1).

Original entry on oeis.org

3, 19, 163, 571, 1459, 8803, 9137, 17497, 41113, 52489, 78787, 87211, 135433, 139483, 144667, 164617, 174763, 196579, 274081, 370009, 370387, 478243, 760267, 941489, 944803, 1041619, 1220347, 1236787, 1319323, 1465129, 1663579, 1994659
Offset: 1

Views

Author

Keywords

Comments

A prime p is in this sequence iff all prime divisors of ord_p(2)/2 are in this sequence, where ord_p(2) is the order of 2 modulo p. - Max Alekseyev, Jul 30 2006

Examples

			2^171 + 1 == 0 (mod 171), 171 = 3^2*19, 2^13203+1 == 0 (mod 13203), 13203 = 3^4*163.
		

Crossrefs

Programs

  • Mathematica
    S = {2}; Reap[For[p = 3, p < 2 10^6, p = NextPrime[p], f = FactorInteger[ MultiplicativeOrder[2, p]]; If[f[[1, 1]] != 2 || f[[1, 2]] != 1, Continue[]]; f = f[[All, 1]]; If[Length[Intersection[S, f]] == Length[f], S = Union[S, {p}]; Print[p]; Sow[p]]]][[2, 1]] (* Jean-François Alcover, Nov 11 2018, from PARI *)
  • PARI
    { A057719() = local(S,f); S=Set([2]); forprime(p=3,10^7, f=factorint(znorder(Mod(2,p))); if(f[1,1]!=2||f[1,2]!=1,next); f=f[,1]; if(length(setintersect(S,Set(f)))==length(f), S=setunion(S,[p]); print1(p,", "))) }

Extensions

Edited by Max Alekseyev, Jul 30 2006

A136473 Primitive elements of the sequence of integers n such that n divides 2^n + 1 (A006521).

Original entry on oeis.org

1, 3, 171, 13203, 97641, 354537, 2354697, 10970073, 29884473, 33894369, 38265939, 74214171, 116226009, 344380329, 751611177, 892145817, 2595432537, 4014314433, 10161972027, 11852199369, 13229694441, 22032887841, 22230967347, 22864359897, 24020090001, 26761542921, 27439598619, 27932906619, 37498011939, 166111451217, 189836046171
Offset: 1

Views

Author

Toby Bailey and Christopher J. Smyth, Jan 13 2008

Keywords

Comments

This gives a sparse subsequence of the sequence A006521 of all integers n such that n | 2^n+1. An element of A006521 is said to be *primitive* if it is not divisible by any smaller element of A006521 having the same prime divisors and further it is not the lcm of any two smaller elements of A006521. See Proposition 1 of the link.
Every element of this sequence apart from 1 and 3 is divisible either by 27 or by 171. Stronger results hold. For instance, every element of this sequence apart from 1 and 3 is divisible either by 171 or 243 or 13203 or 2354697 or 10970073 or 22032887841. See the link or A136475 for more details about such results. These alternative factors enable the sequence to be generated much more quickly than by the short Maple program given below.

Examples

			9 is in A006521 but is not primitive because its set of prime divisors is the same as that of 3, which divides 9 and is in A006521.
250857 is in A006521 but not primitive, as 250857=lcm(171,13203) and both 171 and 13203 are in A006521.
		

Crossrefs

Programs

  • Maple
    L:=1: S:={}: for j from 3 by 6 to 10^7 do if not 2&^j+1 mod j = 0 then next end if; if not (j in S) then L := L,j end if; S := S union map( ilcm, S, j ) union {j}; S := S union map(`*`, {map2( op, 1, ifactors(j)[2] )[]}, j); end do: L;

Extensions

More terms from Max Alekseyev, Aug 04 2011

A289257 Terms k of A006521 such that 2*k is a term of A124240.

Original entry on oeis.org

1, 3, 9, 27, 81, 171, 243, 513, 729, 1539, 2187, 3249, 4617, 6561, 9747, 13203, 13851, 19683, 29241, 39609, 41553, 59049, 61731, 87723, 118827, 124659, 177147, 185193, 250857, 263169, 356481, 373977, 531441, 555579, 752571, 789507, 1063611, 1069443, 1121931, 1172889, 1594323, 1666737
Offset: 1

Views

Author

Michel Marcus, Jun 29 2017

Keywords

Comments

Novák numbers n that are 2n Novák-Carmichael. See Kalmynin link.

Crossrefs

Programs

  • Mathematica
    Reap[Do[If[PowerMod[2, n, n]+1 == n && Divisible[2n, CarmichaelLambda[2n]], Print[n]; Sow[n]], {n, 2 10^6}]][[2, 1]] (* Jean-François Alcover, Sep 25 2018 *)
  • PARI
    isnov(n) = Mod(2, n)^n==-1; \\ A006521
    isnovcar(n) = n%lcm(znstar(n)[2])==0; \\ A124240
    isok(n) = isnov(n) && isnovcar(2*n);
    
  • Python
    from itertools import count, islice
    from sympy.ntheory.factor_ import reduced_totient
    def A289257gen(): return filter(lambda n:2*n % reduced_totient(2*n) == 0 and pow(2,n,n)==n-1, count(1))
    A289257_list = list(islice(A289257gen(),20)) # Chai Wah Wu, Dec 11 2021

A016059 (s(n)+s(n+1))/6, where s()=A006521.

Original entry on oeis.org

2, 6, 18, 42, 69, 126, 207, 378, 621, 906, 1311, 1863, 2718, 3825, 4509, 5589, 8154, 11475, 13527, 16767, 20130, 24909, 30894, 36078, 40581, 50301, 60390, 72675, 85671, 92682, 107910, 118503, 121743, 150903
Offset: 2

Views

Author

Keywords

A016060 (s(n)+s(n+1))/18, where s()=A006521.

Original entry on oeis.org

2, 6, 14, 23, 42, 69, 126, 207, 302, 437, 621, 906, 1275, 1503, 1863, 2718, 3825, 4509, 5589, 6710, 8303, 10298, 12026, 13527, 16767, 20130, 24225, 28557, 30894, 35970, 39501, 40581, 50301
Offset: 3

Views

Author

Keywords

Crossrefs

Cf. A006521.

A000244 Powers of 3: a(n) = 3^n.

Original entry on oeis.org

1, 3, 9, 27, 81, 243, 729, 2187, 6561, 19683, 59049, 177147, 531441, 1594323, 4782969, 14348907, 43046721, 129140163, 387420489, 1162261467, 3486784401, 10460353203, 31381059609, 94143178827, 282429536481, 847288609443, 2541865828329, 7625597484987
Offset: 0

Views

Author

Keywords

Comments

Same as Pisot sequences E(1, 3), L(1, 3), P(1, 3), T(1, 3). Essentially same as Pisot sequences E(3, 9), L(3, 9), P(3, 9), T(3, 9). See A008776 for definitions of Pisot sequences.
Number of (s(0), s(1), ..., s(2n+2)) such that 0 < s(i) < 6 and |s(i) - s(i-1)| = 1 for i = 1, 2, ..., 2n + 2, s(0) = 1, s(2n+2) = 3. - Herbert Kociemba, Jun 10 2004
a(1) = 1, a(n+1) is the least number such that there are a(n) even numbers between a(n) and a(n+1). Generalization for the sequence of powers of k: 1, k, k^2, k^3, k^4, ... There are a(n) multiples of k-1 between a(n) and a(n+1). - Amarnath Murthy, Nov 28 2004
a(n) = sum of (n+1)-th row in Triangle A105728. - Reinhard Zumkeller, Apr 18 2005
With p(n) being the number of integer partitions of n, p(i) being the number of parts of the i-th partition of n, d(i) being the number of different parts of the i-th partition of n, m(i, j) being the multiplicity of the j-th part of the i-th partition of n, Sum_{i = 1..p(n)} being the sum over i and Product_{j = 1..d(i)} being the product over j, one has: a(n) = Sum_{i = 1..p(n)} (p(i)!/(Product_{j = 1..d(i)} m(i, j)!))*2^(p(i) - 1). - Thomas Wieder, May 18 2005
For any k > 1 in the sequence, k is the first prime power appearing in the prime decomposition of repunit R_k, i.e., of A002275(k). - Lekraj Beedassy, Apr 24 2006
a(n-1) is the number of compositions of compositions. In general, (k+1)^(n-1) is the number of k-levels nested compositions (e.g., 4^(n-1) is the number of compositions of compositions of compositions, etc.). Each of the n - 1 spaces between elements can be a break for one of the k levels, or not a break at all. - Franklin T. Adams-Watters, Dec 06 2006
Let S be a binary relation on the power set P(A) of a set A having n = |A| elements such that for every element x, y of P(A), xSy if x is a subset of y. Then a(n) = |S|. - Ross La Haye, Dec 22 2006
From Manfred Boergens, Mar 28 2023: (Start)
With regard to the comment by Ross La Haye:
Cf. A001047 if either nonempty subsets are considered or x is a proper subset of y.
Cf. a(n+1) in A028243 if nonempty subsets are considered and x is a proper subset of y. (End)
If X_1, X_2, ..., X_n is a partition of the set {1, 2, ..., 2*n} into blocks of size 2 then, for n >= 1, a(n) is equal to the number of functions f : {1, 2, ..., 2*n} -> {1, 2} such that for fixed y_1, y_2, ..., y_n in {1, 2} we have f(X_i) <> {y_i}, (i = 1, 2, ..., n). - Milan Janjic, May 24 2007
This is a general comment on all sequences of the form a(n) = [(2^k)-1]^n for all positive integers k. Example 1.1.16 of Stanley's "Enumerative Combinatorics" offers a slightly different version. a(n) in the number of functions f:[n] into P([k]) - {}. a(n) is also the number of functions f:[k] into P([n]) such that the generalized intersection of f(i) for all i in [k] is the empty set. Where [n] = {1, 2, ..., n}, P([n]) is the power set of [n] and {} is the empty set. - Geoffrey Critzer, Feb 28 2009
a(n) = A064614(A000079(n)) and A064614(m)A000079(n). - Reinhard Zumkeller, Feb 08 2010
3^(n+1) = (1, 2, 2, 2, ...) dot (1, 1, 3, 9, ..., 3^n); e.g., 3^3 = 27 = (1, 2, 2, 2) dot (1, 1, 3, 9) = (1 + 2 + 6 + 18). - Gary W. Adamson, May 17 2010
a(n) is the number of generalized compositions of n when there are 3*2^i different types of i, (i = 1, 2, ...). - Milan Janjic, Sep 24 2010
For n >= 1, a(n-1) is the number of generalized compositions of n when there are 2^(i-1) different types of i, (i = 1, 2, ...). - Milan Janjic, Sep 24 2010
The sequence in question ("Powers of 3") also describes the number of moves of the k-th disk solving the [RED ; BLUE ; BLUE] or [RED ; RED ; BLUE] pre-colored Magnetic Tower of Hanoi puzzle (cf. A183111 - A183125).
a(n) is the number of Stern polynomials of degree n. See A057526. - T. D. Noe, Mar 01 2011
Positions of records in the number of odd prime factors, A087436. - Juri-Stepan Gerasimov, Mar 17 2011
Sum of coefficients of the expansion of (1+x+x^2)^n. - Adi Dani, Jun 21 2011
a(n) is the number of compositions of n elements among {0, 1, 2}; e.g., a(2) = 9 since there are the 9 compositions 0 + 0, 0 + 1, 1 + 0, 0 + 2, 1 + 1, 2 + 0, 1 + 2, 2 + 1, and 2 + 2. [From Adi Dani, Jun 21 2011; modified by editors.]
Except the first two terms, these are odd numbers n such that no x with 2 <= x <= n - 2 satisfy x^(n-1) == 1 (mod n). - Arkadiusz Wesolowski, Jul 03 2011
The compositions of n in which each natural number is colored by one of p different colors are called p-colored compositions of n. For n >= 1, a(n) equals the number of 3-colored compositions of n such that no adjacent parts have the same color. - Milan Janjic, Nov 17 2011
Explanation from David Applegate, Feb 20 2017: (Start)
Since the preceding comment appears in a large number of sequences, it might be worth adding a proof.
The number of compositions of n into exactly k parts is binomial(n-1,k-1).
For a p-colored composition of n such that no adjacent parts have the same color, there are exactly p choices for the color of the first part, and p-1 choices for the color of each additional part (any color other than the color of the previous one). So, for a partition into k parts, there are p (p-1)^(k-1) valid colorings.
Thus the number of p-colored compositions of n into exactly k parts such that no adjacent parts have the same color is binomial(n-1,k-1) p (p-1)^(k-1).
The total number of p-colored compositions of n such that no adjacent parts have the same color is then
Sum_{k=1..n} binomial(n-1,k-1) * p * (p-1)^(k-1) = p^n.
To see this, note that the binomial expansion of ((p - 1) + 1)^(n - 1) = Sum_{k = 0..n - 1} binomial(n - 1, k) (p - 1)^k 1^(n - 1 - k) = Sum_{k = 1..n} binomial(n - 1, k - 1) (p - 1)^(k - 1).
(End)
Also, first and least element of the matrix [1, sqrt(2); sqrt(2), 2]^(n+1). - M. F. Hasler, Nov 25 2011
One-half of the row sums of the triangular version of A035002. - J. M. Bergot, Jun 10 2013
Form an array with m(0,n) = m(n,0) = 2^n; m(i,j) equals the sum of the terms to the left of m(i,j) and the sum of the terms above m(i,j), which is m(i,j) = Sum_{k=0..j-1} m(i,k) + Sum_{k=0..i-1} m(k,j). The sum of the terms in antidiagonal(n+1) = 4*a(n). - J. M. Bergot, Jul 10 2013
a(n) = A007051(n+1) - A007051(n), and A007051 are the antidiagonal sums of an array defined by m(0,k) = 1 and m(n,k) = Sum_{c = 0..k - 1} m(n, c) + Sum_{r = 0..n - 1} m(r, k), which is the sum of the terms to left of m(n, k) plus those above m(n, k). m(1, k) = A000079(k); m(2, k) = A045623(k + 1); m(k + 1, k) = A084771(k). - J. M. Bergot, Jul 16 2013
Define an array to have m(0,k) = 2^k and m(n,k) = Sum_{c = 0..k - 1} m(n, c) + Sum_{r = 0..n - 1} m(r, k), which is the sum of the terms to the left of m(n, k) plus those above m(n, k). Row n = 0 of the array comprises A000079, column k = 0 comprises A011782, row n = 1 comprises A001792. Antidiagonal sums of the array are a(n): 1 = 3^0, 1 + 2 = 3^1, 2 + 3 + 4 = 3^2, 4 + 7 + 8 + 8 = 3^3. - J. M. Bergot, Aug 02 2013
The sequence with interspersed zeros and o.g.f. x/(1 - 3*x^2), A(2*k) = 0, A(2*k + 1) = 3^k = a(k), k >= 0, can be called hexagon numbers. This is because the algebraic number rho(6) = 2*cos(Pi/6) = sqrt(3) of degree 2, with minimal polynomial C(6, x) = x^2 - 3 (see A187360, n = 6), is the length ratio of the smaller diagonal and the side in the hexagon. Hence rho(6)^n = A(n-1)*1 + A(n)*rho(6), in the power basis of the quadratic number field Q(rho(6)). One needs also A(-1) = 1. See also a Dec 02 2010 comment and the P. Steinbach reference given in A049310. - Wolfdieter Lang, Oct 02 2013
Numbers k such that sigma(3k) = 3k + sigma(k). - Jahangeer Kholdi, Nov 23 2013
All powers of 3 are perfect totient numbers (A082897), since phi(3^n) = 2 * 3^(n - 1) for n > 0, and thus Sum_{i = 0..n} phi(3^i) = 3^n. - Alonso del Arte, Apr 20 2014
The least number k > 0 such that 3^k ends in n consecutive decreasing digits is a 3-term sequence given by {1, 13, 93}. The consecutive increasing digits are {3, 23, 123}. There are 100 different 3-digit endings for 3^k. There are no k-values such that 3^k ends in '012', '234', '345', '456', '567', '678', or '789'. The k-values for which 3^k ends in '123' are given by 93 mod 100. For k = 93 + 100*x, the digit immediately before the run of '123' is {9, 5, 1, 7, 3, 9, 5, 1, 3, 7, ...} for x = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ...}, respectively. Thus we see the digit before '123' will never be a 0. So there are no further terms. - Derek Orr, Jul 03 2014
All elements of A^n where A = (1, 1, 1; 1, 1, 1; 1, 1, 1). - David Neil McGrath, Jul 23 2014
Counts all walks of length n (open or closed) on the vertices of a triangle containing a loop at each vertex starting from any given vertex. - David Neil McGrath, Oct 03 2014
a(n) counts walks (closed) on the graph G(1-vertex;1-loop,1-loop,1-loop). - David Neil McGrath, Dec 11 2014
2*a(n-2) counts all permutations of a solitary closed walk of length (n) from the vertex of a triangle that contains 2 loops on each of the remaining vertices. In addition, C(m,k)=2*(2^m)*B(m+k-2,m) counts permutations of walks that contain (m) loops and (k) arcs. - David Neil McGrath, Dec 11 2014
a(n) is the sum of the coefficients of the n-th layer of Pascal's pyramid (a.k.a., Pascal's tetrahedron - see A046816). - Bob Selcoe, Apr 02 2016
Numbers n such that the trinomial x^(2*n) + x^n + 1 is irreducible over GF(2). Of these only the trinomial for n=1 is primitive. - Joerg Arndt, May 16 2016
Satisfies Benford's law [Berger-Hill, 2011]. - N. J. A. Sloane, Feb 08 2017
a(n-1) is also the number of compositions of n if the parts can be runs of any length from 1 to n, and can contain any integers from 1 to n. - Gregory L. Simay, May 26 2017
Also the number of independent vertex sets and vertex covers in the n-ladder rung graph n P_2. - Eric W. Weisstein, Sep 21 2017
Also the number of (not necessarily maximal) cliques in the n-cocktail party graph. - Eric W. Weisstein, Nov 29 2017
a(n-1) is the number of 2-compositions of n; see Hopkins & Ouvry reference. - Brian Hopkins, Aug 15 2020
a(n) is the number of faces of any dimension (vertices, edges, square faces, etc.) of the n-dimensional hypercube. For example, the 0-dimensional hypercube is a point, and its only face is itself. The 1-dimensional hypercube is a line, which has two vertices and an edge. The 2-dimensional hypercube is a square, which has four vertices, four edges, and a square face. - Kevin Long, Mar 14 2023
Number of pairs (A,B) of subsets of M={1,2,...,n} with union(A,B)=M. For nonempty subsets cf. A058481. - Manfred Boergens, Mar 28 2023
From Jianing Song, Sep 27 2023: (Start)
a(n) is the number of disjunctive clauses of n variables up to equivalence. A disjunctive clause is a propositional formula of the form l_1 OR ... OR l_m, where l_1, ..., l_m are distinct elements in {x_1, ..., x_n, NOT x_1, ..., NOT x_n} for n variables x_1, ... x_n, and no x_i and NOT x_i appear at the same time. For each 1 <= i <= n, we can have neither of x_i or NOT x_i, only x_i or only NOT x_i appearing in a disjunctive clause, so the number of such clauses is 3^n. Viewing the propositional formulas of n variables as functions {0,1}^n -> {0,1}, a disjunctive clause corresponds to a function f such that the inverse image of 0 is of the form A_1 X ... X A_n, where A_i is nonempty for all 1 <= i <= n. Since each A_i has 3 choices ({0}, {1} or {0,1}), we also find that the number of disjunctive clauses of n variables is 3^n.
Equivalently, a(n) is the number of conjunctive clauses of n variables. (End)
The finite subsequence a(2), a(3), a(4), a(5) = 9, 27, 81, 243 is one of only two geometric sequences that can be formed with all interior angles (all integer, in degrees) of a simple polygon. The other sequence is a subsequence of A007283 (see comment there). - Felix Huber, Feb 15 2024

Examples

			G.f. = 1 + 3*x + 9*x^2 + 27*x^3 + 81*x^4 + 243*x^5 + 729*x^6 + 2187*x^7 + ...
		

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A008776 (2*a(n), and first differences).
a(n) = A092477(n, 2) for n > 0.
a(n) = A159991(n) / A009964(n).
Cf. A100772, A035002. Row sums of A125076 and A153279.
a(n) = A217764(0, n).
Cf. A046816, A006521, A014945, A275414 (multisets).
The following are parallel families: A000079 (2^n), A004094 (2^n reversed), A028909 (2^n sorted up), A028910 (2^n sorted down), A036447 (double and reverse), A057615 (double and sort up), A263451 (double and sort down); A000244 (3^n), A004167 (3^n reversed), A321540 (3^n sorted up), A321539 (3^n sorted down), A163632 (triple and reverse), A321542 (triple and sort up), A321541 (triple and sort down).

Programs

Formula

a(n) = 3^n.
a(0) = 1; a(n) = 3*a(n-1).
G.f.: 1/(1-3*x).
E.g.f.: exp(3*x).
a(n) = n!*Sum_{i + j + k = n, i, j, k >= 0} 1/(i!*j!*k!). - Benoit Cloitre, Nov 01 2002
a(n) = Sum_{k = 0..n} 2^k*binomial(n, k), binomial transform of A000079.
a(n) = A090888(n, 2). - Ross La Haye, Sep 21 2004
a(n) = 2^(2n) - A005061(n). - Ross La Haye, Sep 10 2005
a(n) = A112626(n, 0). - Ross La Haye, Jan 11 2006
Hankel transform of A007854. - Philippe Deléham, Nov 26 2006
a(n) = 2*StirlingS2(n+1,3) + StirlingS2(n+2,2) = 2*(StirlingS2(n+1,3) + StirlingS2(n+1,2)) + 1. - Ross La Haye, Jun 26 2008
a(n) = 2*StirlingS2(n+1, 3) + StirlingS2(n+2, 2) = 2*(StirlingS2(n+1, 3) + StirlingS2(n+1, 2)) + 1. - Ross La Haye, Jun 09 2008
Sum_{n >= 0} 1/a(n) = 3/2. - Gary W. Adamson, Aug 29 2008
If p(i) = Fibonacci(2i-2) and if A is the Hessenberg matrix of order n defined by A(i, j) = p(j-i+1), (i <= j), A(i, j) = -1, (i = j+1), and A(i, j) = 0 otherwise, then, for n >= 1, a(n-1) = det A. - Milan Janjic, May 08 2010
G.f. A(x) = M(x)/(1-M(x))^2, M(x) - o.g.f for Motzkin numbers (A001006). - Vladimir Kruchinin, Aug 18 2010
a(n) = A133494(n+1). - Arkadiusz Wesolowski, Jul 27 2011
2/3 + 3/3^2 + 2/3^3 + 3/3^4 + 2/3^5 + ... = 9/8. [Jolley, Summation of Series, Dover, 1961]
a(n) = Sum_{k=0..n} A207543(n,k)*4^(n-k). - Philippe Deléham, Feb 25 2012
a(n) = Sum_{k=0..n} A125185(n,k). - Philippe Deléham, Feb 26 2012
Sum_{n > 0} Mobius(n)/a(n) = 0.181995386702633887827... (see A238271). - Alonso del Arte, Aug 09 2012. See also the sodium 3s orbital energy in table V of J. Chem. Phys. 53 (1970) 348.
a(n) = (tan(Pi/3))^(2*n). - Bernard Schott, May 06 2022
a(n-1) = binomial(2*n-1, n) + Sum_{k >= 1} binomial(2*n, n+3*k)*(-1)^k. - Greg Dresden, Oct 14 2022
G.f.: Sum_{k >= 0} x^k/(1-2*x)^(k+1). - Kevin Long, Mar 14 2023

A000051 a(n) = 2^n + 1.

Original entry on oeis.org

2, 3, 5, 9, 17, 33, 65, 129, 257, 513, 1025, 2049, 4097, 8193, 16385, 32769, 65537, 131073, 262145, 524289, 1048577, 2097153, 4194305, 8388609, 16777217, 33554433, 67108865, 134217729, 268435457, 536870913, 1073741825, 2147483649, 4294967297, 8589934593
Offset: 0

Views

Author

Keywords

Comments

Same as Pisot sequence L(2,3).
Length of the continued fraction for Sum_{k=0..n} 1/3^(2^k). - Benoit Cloitre, Nov 12 2003
See also A004119 for a(n) = 2a(n-1)-1 with first term = 1. - Philippe Deléham, Feb 20 2004
From the second term on (n>=1), in base 2, these numbers present the pattern 1000...0001 (with n-1 zeros), which is the "opposite" of the binary 2^n-2: (0)111...1110 (cf. A000918). - Alexandre Wajnberg, May 31 2005
Let A be the Hessenberg matrix of order n, defined by: A[1,j]=1, A[i,i]:=5, (i>1), A[i,i-1]=-1, and A[i,j]=0 otherwise. Then, for n>=1, a(n-1)=(-1)^(n-1)* charpoly(A,3). - Milan Janjic, Jan 27 2010
First differences of A006127. - Reinhard Zumkeller, Apr 14 2011
The odd prime numbers in this sequence form A019434, the Fermat primes. - David W. Wilson, Nov 16 2011
Pisano period lengths: 1, 1, 2, 1, 4, 2, 3, 1, 6, 4, 10, 2, 12, 3, 4, 1, 8, 6, 18, 4, ... . - R. J. Mathar, Aug 10 2012
Is the mentioned Pisano period lengths (see above) the same as A007733? - Omar E. Pol, Aug 10 2012
Only positive integers that are not 1 mod (2k+1) for any k>1. - Jon Perry, Oct 16 2012
For n >= 1, a(n) is the total length of the segments of the Hilbert curve after n iterations. - Kival Ngaokrajang, Mar 30 2014
Frénicle de Bessy (1657) proved that a(3) = 9 is the only square in this sequence. - Charles R Greathouse IV, May 13 2014
a(n) is the number of distinct possible sums made with at most two elements in {1,...,a(n-1)} for n > 0. - Derek Orr, Dec 13 2014
For n > 0, given any set of a(n) lattice points in R^n, there exist 2 distinct members in this set whose midpoint is also a lattice point. - Melvin Peralta, Jan 28 2017
Also the number of independent vertex sets, irredundant sets, and vertex covers in the (n+1)-star graph. - Eric W. Weisstein, Aug 04 and Sep 21 2017
Also the number of maximum matchings in the 2(n-1)-crossed prism graph. - Eric W. Weisstein, Dec 31 2017
Conjecture: For any integer n >= 0, a(n) is the permanent of the (n+1) X (n+1) matrix with M(j, k) = -floor((j - k - 1)/(n + 1)). This conjecture is inspired by the conjecture of Zhi-Wei Sun in A036968. - Peter Luschny, Sep 07 2021

References

  • Paul Bachmann, Niedere Zahlentheorie (1902, 1910), reprinted Chelsea, NY, 1968, vol. 2, p. 75.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 46, 60, 244.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 141.

Crossrefs

Apart from the initial 1, identical to A094373.
See A008776 for definitions of Pisot sequences.
Column 2 of array A103438.
Cf. A007583 (a((n-1)/2)/3 for odd n).

Programs

  • Haskell
    a000051 = (+ 1) . a000079
    a000051_list = iterate ((subtract 1) . (* 2)) 2
    -- Reinhard Zumkeller, May 03 2012
    
  • Magma
    [2^n+1: n in [0..40]]; // G. C. Greubel, Jan 18 2025
  • Maple
    A000051:=-(-2+3*z)/(2*z-1)/(z-1); # Simon Plouffe in his 1992 dissertation
    a := n -> add(binomial(n,k)*bernoulli(n-k,1)*2^(k+1)/(k+1),k=0..n); # Peter Luschny, Apr 20 2009
  • Mathematica
    Table[2^n + 1, {n,0,40}]
    2^Range[0,40] + 1 (* Eric W. Weisstein, Jul 17 2017 *)
    LinearRecurrence[{3, -2}, {2, 3}, 40] (* Eric W. Weisstein, Sep 21 2017 *)
  • PARI
    a(n)=2^n+1
    
  • PARI
    first(n) = Vec((2 - 3*x)/((1 - x)*(1 - 2*x)) + O(x^n)) \\ Iain Fox, Dec 31 2017
    
  • Python
    def A000051(n): return (1<Chai Wah Wu, Dec 21 2022
    

Formula

a(n) = 2*a(n-1) - 1 = 3*a(n-1) - 2*a(n-2).
G.f.: (2-3*x)/((1-x)*(1-2*x)).
First differences of A052944. - Emeric Deutsch, Mar 04 2004
a(0) = 1, then a(n) = (Sum_{i=0..n-1} a(i)) - (n-2). - Gerald McGarvey, Jul 10 2004
Inverse binomial transform of A007689. Also, V sequence in Lucas sequence L(3, 2). - Ross La Haye, Feb 07 2005
a(n) = A127904(n+1) for n>0. - Reinhard Zumkeller, Feb 05 2007
Equals binomial transform of [2, 1, 1, 1, ...]. - Gary W. Adamson, Apr 23 2008
a(n) = A000079(n)+1. - Omar E. Pol, May 18 2008
E.g.f.: exp(x) + exp(2*x). - Mohammad K. Azarian, Jan 02 2009
a(n) = A024036(n)/A000225(n). - Reinhard Zumkeller, Feb 14 2009
From Peter Luschny, Apr 20 2009: (Start)
A weighted binomial sum of the Bernoulli numbers A027641/A027642 with A027641(1)=1 (which amounts to the definition B_{n} = B_{n}(1)).
a(n) = Sum_{k=0..n} C(n,k)*B_{n-k}*2^(k+1)/(k+1). (See also A052584.) (End)
a(n) is the a(n-1)-th odd number for n >= 1. - Jaroslav Krizek, Apr 25 2009
From Reinhard Zumkeller, Feb 28 2010: (Start)
a(n)*A000225(n) = A000225(2*n).
a(n) = A173786(n,0). (End)
If p[i]=Fibonacci(i-4) and if A is the Hessenberg matrix of order n defined by: A[i,j]=p[j-i+1], (i<=j), A[i,j]=-1, (i=j+1), and A[i,j]=0 otherwise, then, for n>=1, a(n-1)= det A. - Milan Janjic, May 08 2010
a(n+2) = a(n) + a(n+1) + A000225(n). - Ivan N. Ianakiev, Jun 24 2012
a(A006521(n)) mod A006521(n) = 0. - Reinhard Zumkeller, Jul 17 2014
a(n) = 3*A007583((n-1)/2) for n odd. - Eric W. Weisstein, Jul 17 2017
Sum_{n>=0} 1/a(n) = A323482. - Amiram Eldar, Nov 11 2020

A015949 Numbers k such that k | 3^k + 1.

Original entry on oeis.org

1, 2, 10, 50, 250, 1250, 5050, 6250, 11810, 25250, 31250, 59050, 126250, 156250, 295250, 510050, 631250, 750250, 781250, 1476250, 2125250, 2550250, 3156250, 3751250, 3906250, 5964050, 7381250, 10626250, 12751250, 13947610, 15781250
Offset: 1

Views

Author

Keywords

Comments

a(n) mod 20 = 10 for n >= 3. - G. C. Greubel, Nov 05 2018
This sequence is infinite, because for n > 1, 3^a(n) + 1 is in this sequence. - Jinyuan Wang, Nov 06 2018
For the provided data, if k is a term then p*k is a term where p is an odd divisor of k. - David A. Corneth, Nov 06 2018

Crossrefs

Cf. A034472 (3^n+1).
Cf. A006521 (k | 2^k + 1), A015950 (k | 4^k + 1), A015951 (k | 5^k + 1).
Column k=3 of A333429.

Programs

  • Magma
    [n: n in [1..2*10^7]| Modexp(3, n, n)+1 eq n]; // Vincenzo Librandi, Nov 01 2018
  • Mathematica
    Do[If[PowerMod[3, n, n] + 1 == n, Print[n]], {n, 1, 10^7}] (* Jinyuan Wang, Nov 01 2018 *)
    Select[Range[16*10^6],PowerMod[3,#,#]==#-1&] (* Harvey P. Dale, Dec 15 2024 *)
  • PARI
    for(n=1, 10^7, if(Mod(3, n)^n==-1, print1(n, ", "))) \\ Jinyuan Wang, Nov 01 2018
    

Extensions

Corrected by David W. Wilson

A006517 Numbers k such that k divides 2^k + 2.

Original entry on oeis.org

1, 2, 6, 66, 946, 8646, 180246, 199606, 265826, 383846, 1234806, 3757426, 9880278, 14304466, 23612226, 27052806, 43091686, 63265474, 66154726, 69410706, 81517766, 106047766, 129773526, 130520566, 149497986, 184416166, 279383126
Offset: 1

Views

Author

Keywords

Comments

All terms greater than 1 are even. If an odd term n>1 exists then n = m*2^k + 1 for some k>=1 and odd m. Then n divides 2^(m*2^k) + 1 and so does every prime factor p of n, implying that 2^(k+1) divides the multiplicative order of 2 modulo p and thus p-1. Therefore n = m*2^k + 1 is the product of prime factors of the form t*2^(k+1) + 1, implying that n-1 is divisible by 2^(k+1), a contradiction. - Max Alekseyev, Mar 16 2009
The sequence is infinite. In fact, its intersection with A055685 (given by A219037) is infinite (see Li et al. link). - Max Alekseyev, Oct 11 2012
All terms greater than 6 have at least three distinct prime factors. - Robert Israel, Aug 21 2014

References

  • R. Honsberger, Mathematical Gems, M.A.A., 1973, p. 142.
  • W. Sierpiński, 250 Problems in Elementary Number Theory. New York: American Elsevier, 1970. Problem #18
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Mathematica
    Do[ If[ PowerMod[ 2, n, n ] + 2 == n, Print[n]], {n, 2, 1500000000, 4} ]
    Join[{1},Select[Range[28*10^7],PowerMod[2,#,#]==#-2&]] (* Harvey P. Dale, Aug 13 2018 *)
  • PARI
    is_A006517(n)=!(Mod(2,n)^n+2)  \\ M. F. Hasler, Oct 08 2012

Extensions

Corrected and extended by Joe K. Crump (joecr(AT)carolina.rr.com), Sep 12 2000 and Robert G. Wilson v, Sep 13 2000

A127263 Numbers k such that k^3 divides 2^(k^2)+1.

Original entry on oeis.org

1, 3, 57, 32547, 9961491, 297381939, 1338104811, 3942759027, 5688011361, 8920514307, 9146532873, 40253706489, 243640690617, 764039295291, 1127102902923, 1556475424971, 2251315404417, 3005607686883, 5222670270483
Offset: 1

Views

Author

Max Alekseyev, Mar 27 2007, Mar 29 2007, Apr 18 2007

Keywords

Comments

If k belongs to this sequence, then so does (2^(k^2)+1)/k^2.
From Alexander Adamchuk, May 14 2010: (Start)
3 divides a(n) for n>1.
19 divides a(n) for n>2. (End)

Crossrefs

Programs

  • Mathematica
    Select[Range[100000], Divisible[2^(#^2) + 1, #^3] &] (* Robert Price, Mar 23 2020 *)

Extensions

a(7) from Ryan Propper, Jan 01 2008
a(8)-a(19) from Max Alekseyev, May 14 2010
Showing 1-10 of 48 results. Next