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 61-70 of 86 results. Next

A158928 a(n) is the smallest integer not yet in the sequence with no common base-3 digit with a(n-1).

Original entry on oeis.org

1, 2, 3, 8, 4, 6, 13, 18, 40, 20, 121, 24, 364, 26, 9, 80, 10, 242, 12, 728, 27, 2186, 28, 6560, 30, 19682, 31, 59048, 36, 177146, 37, 531440, 39, 1594322, 81, 4782968, 82, 14348906, 84, 43046720, 85, 129140162, 90, 387420488, 91, 1162261466, 93
Offset: 1

Views

Author

R. J. Mathar, Mar 31 2009

Keywords

Comments

Numbers of A031944 do not appear in this sequence. After a number which has base-3 digits 0 and 1, a number of the form 3^k-1 (see A024023) follows by definition, because its base-3 digits are all 2.

Examples

			The 4th term cannot be 4 because 4(base10)=11(base3) shares a common digit 1 with a(3)=3(base10)=10(base3). It cannot be 5(base10)=12(base3) because this shares the digit 1 with 3=10(base3). It cannot be 6(base10)=20(base3) because this shares the digit 0 with 3=10(base3). It cannot be 7(base10)=21(base3) because this shares the digit 1 with 3=10(base3). It becomes a(4)=8(base10)=22(base3) which does not have the digit 0 or 1 of a(3)=10(base3).
		

Crossrefs

Cf. A067581 (base-10), A158929 (base-4), A158930 (base-5).

A185171 Dimensions of primitive Lie algebras connected with the Mantaci-Reutenauer algebra MR^(2).

Original entry on oeis.org

2, 3, 8, 18, 48, 116, 312, 810, 2184, 5880, 16104, 44220, 122640, 341484, 956576, 2690010, 7596480, 21522228, 61171656, 174336264, 498111952, 1426403748, 4093181688, 11767874940, 33891544368, 97764009000, 282429535752, 817028131140, 2366564736720
Offset: 1

Views

Author

N. J. A. Sloane, Jan 23 2012

Keywords

Comments

Maybe the definition should say: "Number of generators of degree n ...". The paper is a little unclear.
From Petros Hadjicostas, Jun 18 2019: (Start)
An unmarked cyclic composition of n >= 1 is an equivalence class of ordered partitions of n such that two such ordered partitions are equivalent iff one can be obtained from the other by rotation.
Here, a(n) is the number of aperiodic unmarked cyclic compositions of n where up to two colors can be used.
It is also the CHK (circular, identity, unlabeled) transform of the sequence 2, 2, 2, ... See the link by Bowers about such transforms.
If c = (c(n): n >= 1) is the input sequence with g.f. C(x) = Sum_{n >= 1} c(n)*x^n, then the g.f. of the output sequence ((CHK c)d: d >= 1) is -Sum{d >= 1} (mu(d)/d) * log(1 - C(x^d)). Here, c(n) = 2 for all n >= 1, and thus, C(x) = 2*x/(1 - x). It follows that the g.f. of the output sequence is -Sum_{d >= 1} (mu(d)/d) * log(1 - 2*x^d/(1 - x^d)).
(End)

Examples

			From _Petros Hadjicostas_, Jun 18 2019: (Start)
Suppose we have two colors, say, A and B. Here, a(1) = 2 because we have the following aperiodic unmarked cyclic compositions of n = 1: 1_A and 1_B.
We have a(2) = 3 because we have the following aperiodic unmarked cyclic compositions of n = 2: 2_A, 2_B, and 1_A + 1_B.
We have a(3) = 8 because we have the following aperiodic unmarked cyclic compositions of n = 3: 3_A and 3_B; 1_X + 2_Y, where (X, Y) \in {(A, A), (A, B), (B, A), (B, B)}; 1_A + 1_B + 1_B and 1_B + 1_A + 1_A.
(End)
		

Crossrefs

Essentially the same as A027376.

Programs

  • Mathematica
    a[1] = 2; a[n_] := DivisorSum[n, MoebiusMu[#]*3^(n/#)&]/n; Array[a, 29] (* Jean-François Alcover, Dec 07 2015, adapted from PARI *)
  • PARI
    a(l=2,n) = if (n==1, l, sumdiv(n, d, moebius(d)*(1+l)^(n/d))/n); \\ Michel Marcus, Feb 09 2013

Formula

From Petros Hadjicostas, Jun 18 2019: (Start)
a(1) = 2 and a(n) = (1/n) * Sum_{d|n} mu(d) * 3^(n/d) for n > 1 (from Eq. (95) in Novelli and Thibon (2008) or Eq. (100) in Novelli and Thibon (2010)).
a(n) = (1/n) * Sum_{d|n} mu(d) * (3^(n/d) - 1) = (1/n) * Sum_{d|n} mu(d) * A024023(n/d) for n >= 1.
G.f.: -Sum_{d >= 1} (mu(d)/d) * log(1 - 2*x^d/(1 - x^d)) = -x - Sum_{d >= 1} (mu(d)/d) * log(1 - 3*x^d).
(End)

Extensions

More terms from Michel Marcus, Feb 09 2013
Name edited by Petros Hadjicostas, Jun 18 2019

A229985 Decimal expansion of the lower limit of the convergents of the continued fraction [1, 1/3, 1/9, 1/27, ... ].

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Oct 06 2013

Keywords

Comments

Since sum{3^(-k), k = 0,1,2,...} converges, the convergents of [1, 1/3, 1/9, 1/27, ... ] diverge, by the Seidel Convergence Theorem. However, the odd-numbered convergents converge, as do the even-numbered convergents. In the Example section, these limits are denoted by u and v.

Examples

			u = 1.119... = [1, 8, 2, 1, 242, 8, 1, 6560, 26, 1, 177146, 80, 1,...];
v = 3.668... = [3, 1, 2, 80, 1, 8, 2186, 1, 26, 59048, 1, 80, ...].
In both cases, every term of the continued fraction has the form 3^m - 1.
		

Crossrefs

Programs

  • Mathematica
    $MaxExtraPrecision = Infinity; z = 500; t = Table[3^(-n), {n, 0, z}]; u = N[Convergents[t][[z - 1]], 120]; v = N[Convergents[t][[z]], 120];
    RealDigits[u] (* A229985 *)
    RealDigits[v] (* A229986 *)

A229986 Decimal expansion of the upper limit of the convergents of the continued fraction [1, 1/3, 1/9, 1/27, ... ].

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Oct 06 2013

Keywords

Comments

Since sum{3^(-k), k = 0,1,2,...} converges, the convergents of [1, 1/3, 1/9, 1/27, ... ] diverge, by the Seidel Convergence Theorem. However, the odd-numbered convergents converge, as do the even-numbered convergents. In the Example section, these limits are denoted by u and v.

Examples

			u = 1.119... = [1, 8, 2, 1, 242, 8, 1, 6560, 26, 1, 177146, 80, 1,...];
v = 3.668... = [3, 1, 2, 80, 1, 8, 2186, 1, 26, 59048, 1, 80, ...].
In both cases, every term of the continued fraction has the form 3^m - 1.
		

Crossrefs

Programs

  • Mathematica
    $MaxExtraPrecision = Infinity; z = 500; t = Table[3^(-n), {n, 0, z}]; u = N[Convergents[t][[z - 1]], 120]; v = N[Convergents[t][[z]], 120];
    RealDigits[u] (* A229985 *)
    RealDigits[v] (* A229986 *)

A254027 Table T(n,k) = 3^n - 2^k read by antidiagonals.

Original entry on oeis.org

0, 2, -1, 8, 1, -3, 26, 7, -1, -7, 80, 25, 5, -5, -15, 242, 79, 23, 1, -13, -31, 728, 241, 77, 19, -7, -29, -63, 2186, 727, 239, 73, 11, -23, -61, -127, 6560, 2185, 725, 235, 65, -5, -55, -125, -255, 19682, 6559, 2183, 721, 227, 49, -37, -119, -253, -511, 59048, 19681, 6557, 2179, 713, 211, 17, -101, -247, -509, -1023
Offset: 0

Views

Author

K. G. Stier, Jan 22 2015

Keywords

Comments

Table shows differences of a given power of 3 to the powers of 2 (columns), and differences of the powers of 3 to a given power of 2 (rows), respectively.
Note that positive terms (table's upper right area) and negative terms (lower left area) are separated by an imaginary line with slope -log(3)/log(2) = -1.5849625.. (see A020857). This "border zone" of the table is of interest in terms of how close powers of 3 and powers of 2 can get: i.e., those T(n,k) where k/n is a good rational approximation to log(3)/log(2), see A254351 for numerators k and respective A060528 for denominators n.

Examples

			Table begins
   0    2   8  26  80..
  -1    1   7  25  79..
  -3   -1   5  23  73..
  -7   -5   1  19  65..
  -15 -13  -7  11  49..
  ..   ..  ..  ..  ..
		

Crossrefs

Row 0 (=3^n-1) is A024023.
Row 1 (=3^n-2) is A058481.
Row 2 (=3^n-4) is A168611.
Column 0 (=1-2^n) is (-1)A000225.
Column 1 (=3-2^n) is (-1)A036563.
Column 2 (=9-2^n) is (-1)A185346.
Column 3 (=27-2^n) is (-1)A220087.
0,0-Diagonal (=3^n-2^n) is A001047.
1,0-Diagonal (=3^n-2^(n-1)) for n>0 is A083313 or A064686.
0,1-Diagonal (=3^n-2^(n+1)) is A003063.
0,2-Diagonal (=3^n-2^(n+2)) is A214091.

Programs

  • Mathematica
    Table[3^(n-k) - 2^k, {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Dec 18 2017 *)
  • PARI
    for(i=0, 10, {
         for(j=0, i, print1((3^(i-j)-2^j),", "))
    });

A273614 Numbers k such that 3k - 1 divides 3^k - 1.

Original entry on oeis.org

1, 9, 12, 96, 345, 432, 852, 945, 1452, 2160, 3480, 3753, 4800, 6561, 6984, 13230, 15840, 17040, 30210, 31008, 40320, 43776, 44352, 44652, 47628, 55200, 56940, 60420, 61065, 69312, 71145, 74100, 77400, 81504, 125580, 128016, 175952, 192240, 198168
Offset: 1

Views

Author

Juri-Stepan Gerasimov, May 26 2016

Keywords

Crossrefs

Programs

  • Magma
    [n: n in [1..200000] | Modexp(3, n, 3*n-1) eq 1];
    
  • Maple
    a:= proc(n) option remember; local k;
          if n=1 then 1 else for k from 1+a(n-1)
          while 3&^k mod(3*k-1)<>1 do od; k fi
        end:
    seq(a(n), n=1..40);  # Alois P. Heinz, May 27 2016
  • Mathematica
    Select[Range[10^6], PowerMod[3, #, 3*# - 1] == 1 &] (* Giovanni Resta, May 27 2016 *)
  • PARI
    is(n)=Mod(3,3*n-1)^n==1 \\ Charles R Greathouse IV, May 29 2016

A283620 a(n) is the least exponent k such that 3^k-1 is divisible by prime(n)^2, or -1 if no such k exists.

Original entry on oeis.org

2, -1, 20, 42, 5, 39, 272, 342, 253, 812, 930, 666, 328, 1806, 1081, 2756, 1711, 610, 1474, 2485, 876, 6162, 3403, 7832, 4656, 10100, 3502, 5671, 2943, 12656, 16002, 8515, 18632, 19182, 22052, 7550, 12246, 26406, 13861, 29756, 15931, 8145, 18145, 3088, 38612, 39402, 44310
Offset: 1

Views

Author

Michel Marcus, Mar 12 2017

Keywords

Comments

a(2) is -1, because 3^n-1 cannot be divisible by prime(2)=3.
For some terms, prime(n)^2 is also the least square of prime which divides 3^a(n)-1. This is the case for n=1, 5, 6, ..., that is, p=2, 11, 13, ... (see A283454).
If n <> 2, then a(n) = A062117(n) if 3^A062117(n) == 1 (mod prime(n)^2), or
prime(n)*A062117(n) if not. - Robert Israel, Mar 16 2017

Crossrefs

Programs

  • Maple
    subs(FAIL=-1,[seq(numtheory:-order(3, ithprime(i)^2), i=1..100)]); # Robert Israel, Mar 16 2017
  • Mathematica
    Join[{2,-1},Table[Module[{k=1},While[PowerMod[3,k,Prime[n]^2]!=1,k++];k],{n,3,50}]] (* Harvey P. Dale, Oct 22 2023 *)
  • PARI
    a(n) = if (n == 2, -1, k = 1; p = prime(n); while((3^k-1) % p^2, k++); k;);

A290825 Least base-3 digit of n.

Original entry on oeis.org

0, 1, 2, 0, 1, 1, 0, 1, 2, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Robert Israel, Aug 11 2017

Keywords

Examples

			11 = 102_3 so a(11)=0.
		

Crossrefs

Programs

  • Maple
    seq(min(convert(n,base,3)),n=0..100);
  • Mathematica
    Table[Min[IntegerDigits[n,3]],{n,0,120}] (* Harvey P. Dale, Dec 19 2017 *)
  • PARI
    a(n) = if (n==0, 0, vecmin(digits(n, 3))); \\ Michel Marcus, Aug 12 2017

Formula

a(n) = 2 if and only if n > 0 is in A024023.
a(n) = 0 if n is divisible by 3.
a(n) = min(A010872(n), a(A002264(n))).

A327751 Square array T(n,k), n>=0, k>=0, read by antidiagonals, where T(n,k) is the constant term in the expansion of (-1 + Product_{j=1..n} (1 + x_j + 1/x_j))^k.

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 2, 0, 1, 0, 0, 8, 0, 1, 0, 6, 24, 26, 0, 1, 0, 0, 216, 264, 80, 0, 1, 0, 20, 1200, 5646, 2160, 242, 0, 1, 0, 0, 8840, 101520, 121200, 16080, 728, 0, 1, 0, 70, 58800, 2103740, 6136800, 2410326, 115464, 2186, 0, 1
Offset: 0

Views

Author

Seiichi Manyama, Oct 30 2019

Keywords

Comments

T(n,k) is the number of k-step closed walks (from origin to origin) in n-dimensional lattice, using steps (t_1,t_2, ... ,t_n) (t_j = -1, 1 or 0 for 1 <= j <= n) except for (0,0, ... ,0) (t_j = 0 for 1 <= j <= n).

Examples

			Square array begins:
   1, 0,   0,     0,       0,         0, ...
   1, 0,   2,     0,       6,         0, ...
   1, 0,   8,    24,     216,      1200, ...
   1, 0,  26,   264,    5646,    101520, ...
   1, 0,  80,  2160,  121200,   6136800, ...
   1, 0, 242, 16080, 2410326, 332810400, ...
		

Crossrefs

Columns k=0-3 give A000012, A000004, A024023, 24*A016212(n-2).
Rows n=0-4 give A000007, A126869, A094061, A328874, A328875.
Main diagonal is A326920.

Formula

T(n,k) = Sum_{j=0..k} (-1)^(k-j) * binomial(k,j) * A002426(j)^n.

A333773 Replace 2's with (-1)'s in ternary representation of n and sum nonzero terms with alternating signs.

Original entry on oeis.org

0, 1, -1, 3, 2, 4, -3, -4, -2, 9, 8, 10, 6, 7, 5, 12, 13, 11, -9, -10, -8, -12, -11, -13, -6, -5, -7, 27, 26, 28, 24, 25, 23, 30, 31, 29, 18, 19, 17, 21, 20, 22, 15, 14, 16, 36, 37, 35, 39, 38, 40, 33, 32, 34, -27, -28, -26, -30, -29, -31, -24, -23, -25, -36
Offset: 0

Views

Author

Rémy Sigrist, Apr 05 2020

Keywords

Comments

This sequence is a variant of A117966, and shares features with A065620.
Every integer appears exactly once in this sequence.

Examples

			For n = 97:
- 97 = 3^4 + 3^2 + 2*3^1 + 3^0,
- hence a(97) = 3^4 - 3^2 + (-1)*3^1 - 3^0 = 68.
		

Crossrefs

Programs

  • PARI
    a(n) = { my (v=0, t=Vecrev(digits(n,3))); for (k=1, #t, if (t[k]==1, v=+3^(k-1)-v, t[k]==2, v=-3^(k-1)-v)); v }

Formula

a(3*n) = 3*a(n).
a(3*n+1) = 3*a(n) + (-1)^A160384(n).
a(3*n+2) = 3*a(n) - (-1)^A160384(n).
Sum_{k=0..n} a(k) >= 0 with equality iff n belongs to A024023.
a(n) > 0 iff n belongs to A132141.
a(n) < 0 iff n belongs to A157671.
a(A004488(n)) = -a(n).
Previous Showing 61-70 of 86 results. Next