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

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

A006521 Numbers n such that n divides 2^n + 1.

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, 97641, 118827, 124659, 177147, 185193, 250857, 263169, 292923, 354537, 356481, 373977, 531441, 555579, 752571
Offset: 1

Views

Author

Keywords

Comments

Closed under multiplication: if x and y are terms then so is x*y.
More is true: 1. If n is in the sequence then so is any multiple of n having the same prime factors as n. 2. If n and m are in the sequence then so is lcm(n,m). For a proof see the Bailey-Smyth reference. Elements of the sequence that cannot be generated from smaller elements of the sequence using either of these rules are called *primitive*. The sequence of primitive solutions of n|2^n+1 is A136473. 3. The sequence satisfies various congruences, which enable it to be generated quickly. For instance, every element of this sequence not a power of 3 is divisible either by 171 or 243 or 13203 or 2354697 or 10970073 or 22032887841. See the Bailey-Smyth reference. - Toby Bailey and Christopher J. Smyth, Jan 13 2008
A000051(a(n)) mod a(n) = 0. - Reinhard Zumkeller, Jul 17 2014
The number of terms < 10^n: 3, 5, 9, 15, 25, 40, 68, 114, 188, 309, 518, 851, .... - Robert G. Wilson v, May 03 2015
Also known as Novák numbers after Břetislav Novák who was apparently the first to study this sequence. - Charles R Greathouse IV, Nov 03 2016
Conjecture: if n divides 2^n+1, then (2^n+1)/n is squarefree. Cf. A272361. - Thomas Ordowski, Dec 13 2018
Conjecture: For k > 1, k^m == 1 - k (mod m) has an infinite number of positive solutions. - Juri-Stepan Gerasimov, Sep 29 2019

References

  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 243, p. 68, Ellipses, Paris 2008.
  • 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 #16.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Subsequence of A014945.
Cf. A057719 (prime factors), A136473 (primitive n such that n divides 2^n+1).
Cf. A066807 (the corresponding quotients).
Solutions to k^m == k-1 (mod m): 1 (k = 1), this sequence (k = 2), A015973 (k = 3), A327840 (k = 4), A123047 (k = 5), A327943 (k = 6), A328033 (k = 7).
Column k=2 of A333429.

Programs

  • Haskell
    a006521 n = a006521_list !! (n-1)
    a006521_list = filter (\x -> a000051 x `mod` x == 0) [1..]
    -- Reinhard Zumkeller, Jul 17 2014
    
  • Magma
    [n: n in [1..6*10^5] | (2^n+1) mod n eq 0 ]; // Vincenzo Librandi, Dec 14 2018
  • Maple
    for n from 1 to 1000 do if 2^n +1 mod n = 0 then lprint(n); fi; od;
    S:=1,3,9,27,81:C:={171,243,13203,2354697,10970073,22032887841}: for c in C do for j from c to 10^8 by 2*c do if 2&^j+1 mod j = 0 then S:=S, j;fi;od;od; S:=op(sort([op({S})])); # Toby Bailey and Christopher J. Smyth, Jan 13 2008
  • Mathematica
    Do[If[PowerMod[2, n, n] + 1 == n, Print[n]], {n, 1, 10^6}]
    k = 9; lst = {1, 3}; While[k < 1000000, a = PowerMod[2, k, k]; If[a + 1 == k, AppendTo[lst, k]]; k += 18]; lst (* Robert G. Wilson v, Jul 06 2009 *)
    Select[Range[10^5], Divisible[2^# + 1, #] &] (* Robert Price, Oct 11 2018 *)
  • PARI
    for(n=1,10^6,if(Mod(2,n)^n==-1,print1(n,", "))); \\ Joerg Arndt, Nov 30 2014
    
  • Python
    A006521_list = [n for n in range(1,10**6) if pow(2,n,n) == n-1] # Chai Wah Wu, Jul 25 2017
    

Extensions

More terms from David W. Wilson, Jul 06 2009

A127104 Numbers k such that k^2 divides 4^k-1.

Original entry on oeis.org

1, 3, 21, 903, 2667, 7077, 113799, 114681, 304311, 389193, 898779, 932799, 4893357, 6099429, 8131683, 8776257, 14452473, 38350263, 38647497, 40647747, 49427511, 99583113, 118465473, 128794323, 131158041, 152643813, 262275447, 300510651, 314353263, 335873559, 349662369
Offset: 1

Views

Author

Alexander Adamchuk, Jan 05 2007

Keywords

Comments

From Alexander Adamchuk, Jan 11 2007: (Start)
3 divides a(n) for n > 1.
7 divides a(n) for n > 2.
43 divides a(n) for n = {4, 8, 9, 10, 12, 13, 16, ...}.
127 divides a(n) for n = {5, 8, 11, 14, 15, 17, ...}.
Prime factors of a(n) in order of their appearance in {a(n)} are {3, 7, 43, 127, 337, 5419, 431, 1033, 5419, 2287, 3049, 9719, ...}. (End)

Crossrefs

Subset of A014945 (numbers k such that k divides 4^nk-1).

Programs

  • Mathematica
    Select[Range[30000], IntegerQ[(PowerMod[4, #, #^2 ]-1)/#^2 ]&]
  • PARI
    is(k) = Mod(4, k^2)^k == 1; \\ Amiram Eldar, May 25 2024

Extensions

More terms from Ryan Propper and Alexander Adamchuk, Jan 05 2007
a(27)-a(31) from Amiram Eldar, May 25 2024

A129212 Numbers k such that k^3 divides 4^(k^2) - 1.

Original entry on oeis.org

1, 3, 21, 57, 219, 399, 903, 1533, 2667, 4161, 7077, 17157, 18543, 29127, 32547, 50673, 65919, 74109, 96141, 113799, 114681, 134463, 194691, 227829, 304311, 352317, 383907, 389193, 463071, 516621, 672987, 797349, 863517, 898779, 932799, 1252461, 1353639
Offset: 1

Views

Author

Alexander Adamchuk, Apr 03 2007

Keywords

Comments

From Robert Israel, Aug 13 2020: (Start)
Except for 1, all terms are divisible by 3, but not 5 or 9.
All terms > 3 are divisible by at least one of 7, 19 and 73.
Are all terms squarefree? (End)

Crossrefs

Cf. A014945 (numbers k such that k divides 4^k-1).
Cf. A127104 (numbers k such that k^2 divides 4^k-1).
Cf. A128678 (numbers k such that k^3 divides 4^(k^2)+1).

Programs

  • Maple
    filter:= n -> 4&^(n^2)-1 mod (n^3) = 0:
    select(filter, [1,seq(i,i=3..10^6,6)]); # Robert Israel, Aug 13 2020
  • Mathematica
    k=2; Do[ p=Prime[k]; If[ IntegerQ[ (PowerMod[ p+1, n^2, n^3 ] - 1 )/n^3 ], Print[ {k, p, n} ]], {n,1,200000} ]
    k=2; Do[ p=Prime[k]; If[ IntegerQ[ (PowerMod[ p+1, n^2, n^3 ] - 1 )/n^3 ], Print[ {k, p, n} ]], {n,1000000} ] (* Robert G. Wilson v, Apr 06 2007 *)
    Join[{1}, Select[Range[3000000], PowerMod[4, #^2, #^3] == 1 &]] (* Robert Price, Mar 31 2020 *)

Extensions

More terms from Robert G. Wilson v, Apr 06 2007

A128360 Numbers k such that k divides 20^k - 1.

Original entry on oeis.org

1, 19, 361, 6859, 130321, 2476099, 47045881, 148305659, 893871739, 2817807521, 4234136149, 10350100679, 16983563041, 53538342899, 80448586831, 196651912901, 322687697779, 815211156289, 1017228515081, 1432001198261, 1528523149789
Offset: 1

Views

Author

Alexander Adamchuk, Mar 02 2007

Keywords

Comments

19 divides a(n) for n > 1. All powers of 19 are terms. a(n) = 19^(n-1) for all to n < 8, while a(8) = A128356(8) = 148305659 = 410819*19^2.
Prime divisors of a(n) in the order of appearance are {19, 410819, 617311, 1508981, ...}. - Alexander Adamchuk, May 16 2010

Crossrefs

Programs

Extensions

a(9)-a(11) from Stefan Steinerberger, May 09 2007
a(12)-a(15) from Alexander Adamchuk, May 16 2010
Edited and a(16)-a(21) added by Max Alekseyev, Oct 02 2010

A014741 Numbers k such that k divides 2^(k+1) - 2.

Original entry on oeis.org

1, 2, 6, 18, 42, 54, 126, 162, 294, 342, 378, 486, 882, 1026, 1134, 1314, 1458, 1806, 2058, 2394, 2646, 3078, 3402, 3942, 4374, 5334, 5418, 6174, 6498, 7182, 7938, 9198, 9234, 10206, 11826, 12642, 13122, 14154, 14406, 16002, 16254
Offset: 1

Views

Author

Keywords

Comments

Also, numbers k such that k divides Eulerian number A000295(k+1) = 2^(k+1) - k - 2.
Also, numbers k such that k divides A086787(k) = Sum_{i=1..k} Sum_{j=1..k} i^j.
All terms greater than 1 are even; for a proof, see comment in A036236. - Max Alekseyev, Feb 03 2012
If k>1 is a term, then 3*k is also a term. - Alexander Adamchuk, Nov 03 2006
Prime numbers of the form a(m)+1 are given by A069051. - Max Alekseyev, Nov 14 2012
The number 2^m - 2 is a term of this sequence if and only if m - 1 is a term. - Thomas Ordowski, Jul 01 2024

Crossrefs

Programs

Formula

For n > 1, a(n) = 2*A014945(n-1). - Max Alekseyev, Nov 14 2012

A069051 Primes p such that p-1 divides 2^p-2.

Original entry on oeis.org

2, 3, 7, 19, 43, 127, 163, 379, 487, 883, 1459, 2647, 3079, 3943, 5419, 9199, 11827, 14407, 16759, 18523, 24967, 26407, 37339, 39367, 42463, 71443, 77659, 95923, 99079, 113779, 117307, 143263, 174763, 175447, 184843, 265483, 304039, 308827
Offset: 1

Views

Author

Benoit Cloitre, Apr 03 2002

Keywords

Comments

These are the prime values of n such that 2^n == 2 (mod n*(n-1)). - V. Raman, Sep 17 2012
These are the prime values p such that n^(2^(p-1)) is congruent to n or -n (mod p) for all n in Z/pZ, the commutative ring associated with each term. This results follows from Fermat's little theorem. - Philip A. Hoskins, Feb 08 2013
A prime p is in this sequence iff p-1 belongs to A014741. For p>2, this is equivalent to (p-1)/2 belonging to A014945. - Max Alekseyev, Aug 31 2016
From Thomas Ordowski, Nov 20 2018: (Start)
Conjecture: if n-1 divides 2^n-2, then (2^n-2)/(n-1) is squarefree.
Numbers n such that b^n == b (mod (n-1)*n) for every integer b are 2, 3, 7, and 43; i.e., only prime numbers of the form A014117(k) + 1. (End)
These are primes p such that p^2 divides b^(2^p-2) - 1 for every b coprime to p. - Thomas Ordowski, Jul 01 2024

Crossrefs

a(n)-1 form subsequence of A014741; (a(n)-1)/2 for n>1 forms a subsequence of A014945.

Programs

  • GAP
    Filtered([1..350000],p->IsPrime(p) and (2^p-2) mod (p-1)=0); # Muniru A Asiru, Dec 03 2018
    
  • Magma
    [p : p in PrimesUpTo(310000) | IsZero((2^p-2) mod (p-1))]; // Vincenzo Librandi, Dec 03 2018
    
  • Mathematica
    Select[Prime[Range[10000]], Mod[2^# - 2, # - 1] == 0 &] (* T. D. Noe, Sep 19 2012 *)
    Join[{2,3},Select[Prime[Range[30000]],PowerMod[2,#,#-1]==2&]] (* Harvey P. Dale, Apr 17 2022 *)
  • PARI
    isA069051(p)=Mod(2,p-1)^p==2 && isprime(p); \\ Charles R Greathouse IV, Sep 19 2012
    
  • Python
    from sympy import prime
    for n in range(1,350000):
        if (2**prime(n)-2) % (prime(n)-1)==0:
            print(prime(n)) # Stefano Spezia, Dec 07 2018

Extensions

a(1) added by Charles R Greathouse IV, Sep 19 2012

A014960 Integers n such that n divides 24^n - 1.

Original entry on oeis.org

1, 23, 529, 1081, 12167, 24863, 50807, 279841, 571849, 1168561, 2387929, 2870377, 6436343, 7009273, 13152527, 15954479, 26876903, 54922367, 66018671, 112232663, 134907719, 148035889, 161213279, 302508121, 329435831
Offset: 1

Views

Author

Keywords

Comments

Also, numbers n such that n divides s(n), where s(1)=1, s(k)=s(k-1)+k*24^(k-1) (cf. A014942).
All n > 1 in the sequence are multiple of 23. - Conjectured by Thomas Baruchel, Oct 10 2003; proved by Max Alekseyev, Nov 16 2019
If n is a term and prime p|(24^n - 1), then n*p is a term. In particular, if n is a term and prime p|n, then n*p is a term. The smallest term with 3 distinct prime factors is a(16) = 15954479 = 23 * 47 * 14759. - Max Alekseyev, Nov 16 2019

Crossrefs

Prime factors are listed in A087807.
Cf. A014942.
Integers n such that n divides b^n - 1: A067945 (b=3), A014945 (b=4), A067946 (b=5), A014946 (b=6), A067947 (b=7), A014949 (b=8), A068382 (b=9), A014950 (b=10), A068383 (b=11), A014951 (b=12), A116621 (b=13), A014956 (b=14), A177805 (b=15), A014957 (b=16), A177807 (b=17), A128358 (b=18), A125000 (b=19), A128360 (b=20), A014959 (b=22).

Programs

  • Mathematica
    s = 1; Do[ If[ Mod[ s, n ] == 0, Print[n]]; s = s + (n + 1)*24^n, {n, 1, 100000}]
    Join[{1},Select[Range[330*10^6],PowerMod[24,#,#]==1&]] (* Harvey P. Dale, Jan 19 2023 *)

Extensions

More terms from Robert G. Wilson v, Sep 13 2000
a(9)-a(12) from Thomas Baruchel, Oct 10 2003
Edited and terms a(13) onward added by Max Alekseyev, Nov 16 2019

A014956 Positive integers k such that k divides 14^k - 1.

Original entry on oeis.org

1, 13, 169, 2041, 2197, 26533, 28561, 114413, 320437, 344929, 371293, 1487369, 4165681, 4484077, 4826809, 17962841, 19335797, 24355253, 50308609, 54153853, 58293001, 62748517, 77457601, 233516933, 249302027, 251365361, 316618289
Offset: 1

Views

Author

Keywords

Comments

Also, positive integers k such that k divides A014929(k).
13 divides a(n) for n > 1. All powers of 13 are terms. All a(n) that are not powers of 13 are divisible either by 157 or 677 or both. - Alexander Adamchuk, May 14 2010
Prime divisors of a(n) in order of appearance: {13, 157, 677, 11933, 122147, 52807, ...}. - Alexander Adamchuk, May 16 2010

Crossrefs

Programs

  • Mathematica
    Join[{1}, Select[Range[2000000], PowerMod[14, #, #] == 1 &]] (* Robert Price, Mar 31 2020 *)

Extensions

2 more terms from R. J. Mathar, Mar 05 2008
a(8)-a(23) from Alexander Adamchuk, May 14 2010
a(24)-a(44) from Alexander Adamchuk, May 16 2010
Edited by Max Alekseyev, Sep 10 2011

A068382 Numbers k such that k divides 9^k - 1.

Original entry on oeis.org

1, 2, 4, 8, 10, 16, 20, 32, 40, 50, 64, 80, 100, 110, 128, 136, 160, 164, 200, 220, 250, 256, 272, 320, 328, 400, 440, 500, 512, 544, 550, 610, 640, 656, 680, 800, 820, 880, 1000, 1024, 1088, 1100, 1210, 1220, 1250, 1280, 1312, 1360, 1544, 1600, 1640, 1760
Offset: 1

Views

Author

Benoit Cloitre, Mar 05 2002

Keywords

Comments

For all m the sequence includes 2^m, 10^m, 2*10^m, 10*2^m.

Crossrefs

Programs

  • Mathematica
    Join[{1}, Select[Range[10000], PowerMod[9, #, #] == 1 &]] (* Robert Price, Apr 04 2020 *)
  • PARI
    isok(n) = Mod(9, n)^n == Mod(1, n); \\ Michel Marcus, May 06 2016
Showing 1-10 of 26 results. Next