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-7 of 7 results.

A107448 Irregular triangle T(n, k) = b(n) + k^2 + k + 1, where b(n) = A056486(n-1) - (1/2)*[n=1], for n >= 1 and 1 <= k <= b(n) - 1, read by rows.

Original entry on oeis.org

5, 7, 11, 17, 13, 17, 23, 31, 41, 53, 67, 83, 101, 19, 23, 29, 37, 47, 59, 73, 89, 107, 127, 149, 173, 199, 227, 257, 43, 47, 53, 61, 71, 83, 97, 113, 131, 151, 173, 197, 223, 251, 281, 313, 347, 383, 421, 461, 503, 547, 593, 641, 691, 743, 797, 853, 911, 971, 1033
Offset: 1

Views

Author

Roger L. Bagula, May 26 2005

Keywords

Comments

Former title: Triangular form sequence made from a version of A082605 Euler extension.

Examples

			The irregular triangle begins as:
   5;
   7, 11, 17;
  13, 17, 23, 31, 41, 53, 67, 83, 101;
  19, 23, 29, 37, 47, 59, 73, 89, 107, 127, 149, 173, 199, 227, 257;
		

References

  • Advanced Number Theory, Harvey Cohn, Dover Books, 1963, Page 155

Crossrefs

Programs

  • Magma
    b:= func< n | n eq 1 select 2 else 2^(n-3)*(9-(-1)^n) >;
    A107448:= func< n,k | b(n) +k^2 +k +1 >;
    [A107448(n,k): k in [1..b(n)-1], n in [1..8]]; // G. C. Greubel, Mar 23 2024
    
  • Mathematica
    (* First program *)
    a[1] = 3; a[2] = 5; a[3] = 11; a[n_]:= a[n]= Abs[1-4*a[n-2]] -2;
    euler= Table[a[n], {n,10}];
    Table[k^2 + k + euler[[n]], {n,7}, {k,euler[[i]] -2}]//Flatten
    (* Second program *)
    b[n_]:= 2^(n-3)*(9-(-1)^n) - Boole[n==1]/2;
    T[n_, k_]:= b[n] +k^2+k+1;
    Table[T[n,k], {n,8}, {k,b[n]-1}]//Flatten (* G. C. Greubel, Mar 23 2024 *)
  • SageMath
    def b(n): return 2^(n-3)*(9-(-1)^n) - int(n==1)/2
    def A107448(n,k): return b(n) + k^2+k+1;
    flatten([[A107448(n,k) for k in range(1,b(n))] for n in range(1,8)]) # G. C. Greubel, Mar 23 2024

Formula

T(n, k) = b(n) + k^2 + k + 1, where b(n) = A056486(n-1) - (1/2)*[n=1], for n >= 1 and 1 <= k <= b(n) - 1. - G. C. Greubel, Mar 23 2024

Extensions

Edited by G. C. Greubel, Mar 23 2024

A107449 Irregular triangle T(n, k) = 10 - ( (b(n) + k^2 + k + 1) mod 10 ), where b(n) = A056486(n-1) - (1/2)*[n=1], for n >= 1 and 1 <= k <= b(n) - 1, read by rows.

Original entry on oeis.org

5, 3, 9, 3, 7, 3, 7, 9, 9, 7, 3, 7, 9, 1, 7, 1, 3, 3, 1, 7, 1, 3, 3, 1, 7, 1, 3, 3, 7, 3, 7, 9, 9, 7, 3, 7, 9, 9, 7, 3, 7, 9, 9, 7, 3, 7, 9, 9, 7, 3, 7, 9, 9, 7, 3, 7, 9, 9, 7, 3, 7, 9, 9, 7, 3, 7, 9, 3, 9, 3, 5, 5, 3, 9, 3, 5, 5, 3, 9, 3, 5, 5, 3, 9, 3, 5, 5, 3, 9, 3, 5, 5, 3, 9, 3, 5, 5, 3, 9, 3, 5, 5, 3, 9, 3
Offset: 1

Views

Author

Roger L. Bagula, May 26 2005

Keywords

Examples

			The irregular triangle begins as:
  5;
  3, 9, 3;
  7, 3, 7, 9, 9, 7, 3, 7, 9;
  1, 7, 1, 3, 3, 1, 7, 1, 3, 3, 1, 7, 1, 3, 3;
		

Crossrefs

Programs

  • Magma
    b:= func< n | n eq 1 select 2 else 2^(n-3)*(9-(-1)^n) >;
    A107448:= func< n, k | 10 - ((b(n) +k^2 +k +1) mod 10) >;
    [5,3,9,3] cat [A107448(n, k): k in [1..b(n)-1], n in [3..8]]; // G. C. Greubel, Mar 24 2024
    
  • Mathematica
    b[n_]:= 2^(n-3)*(9-(-1)^n) -Boole[n==1]/2;
    T[n_, k_]:= 10  -Mod[k^2+k+1+b[n], 10];
    Table[T[n, k], {n,8}, {k,b[n]-1}]//Flatten (* G. C. Greubel, Mar 24 2024 *)
  • SageMath
    def b(n): return 2^(n-3)*(9-(-1)^n) - int(n==1)/2
    def A107449(n, k): return 10 - ((b(n) + k^2+k+1)%10);
    flatten([[A107449(n, k) for k in range(1, b(n))] for n in range(1, 8)]) # G. C. Greubel, Mar 24 2024

Formula

T(n, k) = 10 - (b(n) + k^2 + k + 1) mod 10, where b(n) = A056486(n-1) - (1/2)*[n=1], for n >= 1 and 1 <= k <= b(n) - 1. - G. C. Greubel, Mar 24 2024

Extensions

Edited by G. C. Greubel, Mar 24 2024

A032275 Number of bracelets (turnover necklaces) of n beads of 4 colors.

Original entry on oeis.org

4, 10, 20, 55, 136, 430, 1300, 4435, 15084, 53764, 192700, 704370, 2589304, 9608050, 35824240, 134301715, 505421344, 1909209550, 7234153420, 27489127708, 104717491064, 399827748310, 1529763696820
Offset: 1

Views

Author

Keywords

Examples

			For n=2, the ten bracelets are AA, AB, AC, AD, BB, BC, BD, CC, CD, and DD. - _Robert A. Russell_, Sep 24 2018
		

Crossrefs

Column 4 of A051137.

Programs

  • Mathematica
    mx=40;CoefficientList[Series[(1-Sum[ EulerPhi[n]*Log[1-4*x^n]/n,{n,mx}]+(1+4 x+6 x^2)/(1-4 x^2))/2,{x,0,mx}],x] (* Herbert Kociemba, Nov 02 2016 *)
    k=4; Table[DivisorSum[n, EulerPhi[#] k^(n/#) &]/(2n) + (k^Floor[(n+1)/2] + k^Ceiling[(n+1)/2])/4, {n, 1, 30}] (* Robert A. Russell, Sep 24 2018 *)

Formula

"DIK" (bracelet, indistinct, unlabeled) transform of 4, 0, 0, 0, ...
Equals (A001868(n) + A056486(n)) / 2 = A001868(n) - A278640(n) = A278640(n) + A056486(n), for n>=1.
a(n) = A081720(n,4), n >= 4. - Wolfdieter Lang, Jun 03 2012
G.f.: (1 - Sum_{n>=1} phi(n)*log(1 - 4*x^n)/n + (1+4*x+6*x^2)/(1-4*x^2))/2. - Herbert Kociemba, Nov 02 2016
a(n) = (k^floor((n+1)/2) + k^ceiling((n+1)/2))/4 + (1/(2*n))* Sum_{d|n} phi(d)*k^(n/d), where k=4 is the maximum number of colors. - Robert A. Russell, Sep 24 2018
a(n) = (k^floor((n+1)/2) + k^ceiling((n+1)/2))/4 + (1/(2*n))*Sum_{i=1..n} k^gcd(n,i), where k=4 is the maximum number of colors. (See A075195 formulas.) - Richard L. Ollerton, May 04 2021

A284855 Array read by antidiagonals: T(n,k) = number of necklaces with n beads and k colors that are the same when turned over.

Original entry on oeis.org

1, 2, 1, 3, 3, 1, 4, 6, 4, 1, 5, 10, 9, 6, 1, 6, 15, 16, 18, 8, 1, 7, 21, 25, 40, 27, 12, 1, 8, 28, 36, 75, 64, 54, 16, 1, 9, 36, 49, 126, 125, 160, 81, 24, 1, 10, 45, 64, 196, 216, 375, 256, 162, 32, 1, 11, 55, 81, 288, 343, 756, 625, 640, 243, 48, 1
Offset: 1

Views

Author

Andrew Howroyd, Apr 04 2017

Keywords

Comments

Number of periodic palindromes of length n using a maximum of k different symbols.
From Petros Hadjicostas, Sep 02 2018: (Start)
According to Christian Bower's theory of transforms, we have boxes of different sizes and different colors. The size of a box is determined by the number of balls it can hold. In this case, we assume all balls are the same and are unlabeled. Assume also that the number of possible colors a box with m balls can have is given by c(m). We place the boxes on a circle at equal distances from each other. Two configurations of boxes on the circle are considered equivalent if one can be obtained from the other by rotation. We are interested about circular configurations of boxes that are circular palindromes (i.e., necklaces with boxes that are the same when turned over). Let b(n) be the number of circularly palindromic configurations of boxes on a circle when the total number of balls in the boxes is n (and each box contains at least one ball).
Bower calls the sequence (b(n): n >= 1), the CPAL ("circular palindrome") transform of the input sequence (c(m): m >= 1). If the g.f. of the input sequence (c(m): m >= 1) is C(x) = Sum_{m>=1} c(m)*x^m, then the g.f. of the output sequence (b(n): n >= 1) is B(x) = Sum_{n >= 1} b(n)*x^n = (1 + C(x))^2/(2*(1 - C(x^2))) - 1/2.
In the current sequence, each box holds only one ball but can have one of k colors. Hence, c(1) = k but c(m) = 0 for m >= 2. Thus, C(x) = k*x. Then, for fixed k, the output sequence is (b(n): n >= 1) = (T(n, k): n >= 1), where T(n, k) = number of necklaces with n beads and k colors that are the same when turned over. If we let B_k(x) = Sum_{n>=1} T(n, k)*x^n, then B_k(x) = (1 + k*x)^2/(2*(1 - k*x^2)) - 1/2. From this, we can easily prove the formulae below.
Note that T(n, k=2) - 1 is the total number of Sommerville symmetric cyclic compositions of n. See pp. 301-304 in his paper in the links below. To see why this is the case, we use MacMahon's method of representing a cyclic composition of n with a necklace of 2 colors (see p. 273 in Sommerville's paper where the two "colors" are an x and a dot . rather than B and W). Given a Sommerville symmetrical composition b_1 + ... + b_r of n (with b_i >= 1 for all i and 1 <= r <= n), create the following circularly palindromic necklace with n beads of 2 colors: Start with a B bead somewhere on the circle and place b_1 - 1 W beads to the right of it; place a B bead to the right of the W beads (if any) followed by b_2 - 1 W beads; and so on. At the end, place a B bead followed with b_r - 1 W beads. (If b_i = 1 for some i, then a B bead follows a B bead since there are 0 W beads between them.) We thus get a circularly palindromic necklace with n beads of two colors. (The only necklace we cannot get with this method is the one than has all n beads colored W.)
It is interesting that the representation of a necklace of length n, say s_1, s_2, ..., s_n, as a periodic sequence (..., s_{-2}, s_{-1}, s_0, s_1, s_2, ...) with the property s_i = s_{i+n} for all i, as was done by Marks R. Nester in Chapter 2 of his 1999 PhD thesis, was considered by Sommerville in his 1909 paper (in the very first paragraph of his paper). (End)

Examples

			Table starts:
1  2   3    4    5     6     7      8      9     10 ...
1  3   6   10   15    21    28     36     45     55 ...
1  4   9   16   25    36    49     64     81    100 ...
1  6  18   40   75   126   196    288    405    550 ...
1  8  27   64  125   216   343    512    729   1000 ...
1 12  54  160  375   756  1372   2304   3645   5500 ...
1 16  81  256  625  1296  2401   4096   6561  10000 ...
1 24 162  640 1875  4536  9604  18432  32805  55000 ...
1 32 243 1024 3125  7776 16807  32768  59049 100000 ...
1 48 486 2560 9375 27216 67228 147456 295245 550000 ...
...
For n = 4 and k = 2, the palindromic necklaces are 0000, 0001, 0011, 0111, 0101, 1111 so T(4,2) = 6. Necklaces are only counted up to cyclic equivalence.
For n = 4 and k = 2, using MacMahon's bijection, with B = 0 and W = 1, the corresponding Sommerville symmetrical cyclic compositions of n = 4 are as follows: 1+1+1+1, 1+1+2, 1+3, 4, 2+2 (with none for 1111). If we let B = 1 and W = 0, we get the corresponding symmetrical cyclic compositions of n=4: (none for 0000) 4, 1+3, 1+1+2, 2+2, 1+1+1+1. (All these cyclic compositions must viewed on a circle.) - _Petros Hadjicostas_, Sep 02 2018
		

References

  • M. R. Nester (1999). Mathematical investigations of some plant interaction designs. PhD Thesis. University of Queensland, Brisbane, Australia. [See A056391 for the pdf file of Chap. 2]

Crossrefs

Programs

  • Mathematica
    a[n_, k_] := If[EvenQ[n], (k^(n/2) + k^(n/2 + 1))/2, k^((n+1)/2)];
    Table[a[n-k+1, k], {n, 1, 11}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Jun 05 2017, translated from PARI *)
  • PARI
    a(n,k) = if(n % 2 == 0, (k^(n/2) + k^(n/2+1))/2, k^((n+1)/2));
    for(n=1, 10, for(k=1, 10, print1( a(n,k),", ");); print(););

Formula

T(2*n, k) = (k^(n+1) + k^n) / 2.
T(2*n + 1, k) = k^(n+1).
T(n, k) = 2 * A081720(n, k) - A075195(n, k).
From Petros Hadjicostas, Sep 02 2018: (Start)
For fixed k >= 1, the k-th column (T(n, k): n >= 1) is the CPAL ("circular palindrome") transform of the sequence k, 0, 0, ...
G.f. of column k: Sum_{n>=1} T(n,k)*x^n = (1 + k*x)^2/(2*(1 - k*x^2)) - 1/2. (End)

A082605 Using Euler's 6-term sequence A014556, we define the partial recurrence relation a(0)=2, a(1)=3, a(2)=5; a(k) = 2*a(k-1) - 1 - (-2)^(k-2), 3 <= k <= 5.

Original entry on oeis.org

2, 3, 5, 11, 17, 41, 65, 161, 257, 641, 1025, 2561, 4097, 10241, 16385, 40961, 65537, 163841, 262145, 655361, 1048577, 2621441, 4194305, 10485761, 16777217, 41943041, 67108865, 167772161, 268435457, 671088641, 1073741825, 2684354561
Offset: 0

Views

Author

Johan Meyer and Ben de la Rosa (meyerjh.sci(AT)mail.uovs.ac.za), May 23 2003

Keywords

Comments

Using this definition of a(k) we (formally) work backwards towards a(2)=5 to arrive at the formula for a(k) below.
For k >= 3, a(k) has the simple form a(k) = 2^(k-2)*(4 + (1 + (-1)^(k+1))/2) + 1; and it follows by induction that a(k) is congruent to 17 (mod 24) for all k >= 4. Direct calculations show that for k >= 3, the discriminants of the polynomials x^2 + x + a(k), D(k) = 1 - 4*a(k), satisfy the functional equation -D(k) = a(k+2) + 2.

Crossrefs

a(0..6) and a(2*n) same as A085613(n+1).

Programs

  • Magma
    A082605:= func< n | n le 1 select n+2 else 2^(n-3)*(9-(-1)^n) +1 >;
    [A082605(n): n in [0..40]]; // G. C. Greubel, Mar 23 2024
    
  • Maple
    aList := proc(len) local egf, ser, n;
    egf := (exp(-2*x) + 9*exp(2*x) - 10)/4; ser := series(egf, x, len + 2);
    [2, 3, 5, seq(1 + n!*coeff(ser,x, n), n = 2..len)] end:
    aList(30);  # Peter Luschny, Mar 23 2024
  • Mathematica
    LinearRecurrence[{1,4,-4}, {2,3,5,11,17}, 32] (* Georg Fischer, May 15 2019 *)
  • PARI
    a(n)=if(n<2,if(n<1,2,3),if(n%2==0,4^(n/2)+1,5/2*4^((n-1)/2)+1))
    
  • SageMath
    def A082605(n): return 1 + 2^(n-3)*(9-(-1)^n) -int(n==1)/2
    [A082605(n) for n in range(41)] # G. C. Greubel, Mar 23 2024

Formula

(a(k))(k>=0) = 2^(k-2)*(4 + Sum{r=2..k-1} (-1)^r) + 1, the empty sums corresponding to k=0, 1, 2 of course taken to be zero.
a(n) = A056486(n-1) + 1. - Ralf Stephan, Mar 19 2004
From Georg Fischer, May 15 2019: (Start)
a(2*n) = 2^n + 1.
G.f.: (2+x-6*x^2+2*x^3-2*x^4)/((1-x)*(1-2*x)*(1+2*x)). (End)

Extensions

More terms from Ralf Stephan, Mar 19 2004

A278640 Number of pairs of orientable necklaces with n beads and up to 4 colors; i.e., turning the necklace over does not leave it unchanged. The turned-over necklace is not included in the count.

Original entry on oeis.org

0, 0, 0, 4, 15, 72, 270, 1044, 3795, 14060, 51204, 188604, 694130, 2572920, 9567090, 35758704, 134137875, 505159200, 1908554190, 7233104844, 27486506268, 104713296760, 399817262550, 1529746919604, 5864041395730, 22517964582504, 86607602546220, 333599838189804, 1286742419927070, 4969488707124120, 19215357085867800
Offset: 0

Views

Author

Herbert Kociemba, Nov 24 2016

Keywords

Comments

Number of chiral bracelets of n beads using up to four different colors.

Examples

			Example: For 3 beads and the colors A, B, C and D the 4 orientable necklaces are ABC, ABD, ACD and BCD. The turned-over necklaces ACB, ADB, ADC and BDC are not included in the count.
		

Crossrefs

Column 4 of A293496.
Cf. A059076 (2 colors), A278639 (3 colors).
Equals (A001868 - A056486) / 2 = A001868 - A032275 = A032275 - A056486.

Programs

  • Mathematica
    mx=40;f[x_,k_]:=(1-Sum[EulerPhi[n]*Log[1-k*x^n]/n,{n,1,mx}]-Sum[Binomial[k,i]*x^i,{i,0,2}]/(1-k*x^2))/2;CoefficientList[Series[f[x,4],{x,0,mx}],x]
    k=4; Prepend[Table[DivisorSum[n, EulerPhi[#] k^(n/#) &]/(2n) - (k^Floor[(n+1)/2] + k^Ceiling[(n+1)/2])/4, {n, 1, 30}], 0] (* Robert A. Russell, Sep 24 2018 *)

Formula

G.f.: k=4, (1 - Sum_{n>=1} phi(n)*log(1 - k*x^n)/n - Sum_{i=0..2} Binomial[k,i]*x^i / ( 1-k*x^2) )/2.
For n > 0, a(n) = -(k^floor((n+1)/2) + k^ceiling((n+1)/2))/4 + (1/2n)* Sum_{d|n} phi(d)*k^(n/d), where k=4 is the maximum number of colors. - Robert A. Russell, Sep 24 2018

A056495 Number of primitive (period n) periodic palindromes using a maximum of four different symbols.

Original entry on oeis.org

4, 6, 12, 30, 60, 138, 252, 600, 1008, 2490, 4092, 10050, 16380, 40698, 65460, 163200, 262140, 654192, 1048572, 2618850, 4194036, 10481658, 16777212, 41932200, 67108800, 167755770, 268434432, 671047650
Offset: 1

Views

Author

Keywords

Comments

Number of aperiodic necklaces with four colors that are the same when turned over and hence have reflectional symmetry but no rotational symmetry. - Herbert Kociemba, Nov 29 2016

Examples

			For example, aaabbb is not a (finite) palindrome but it is a periodic palindrome.
		

References

  • M. R. Nester (1999). Mathematical investigations of some plant interaction designs. PhD Thesis. University of Queensland, Brisbane, Australia. [See A056391 for pdf file of Chap. 2]

Crossrefs

Column 4 of A284856.
Cf. A056460.

Programs

  • Mathematica
    mx=40;gf[x_,k_]:=Sum[ MoebiusMu[n]*Sum[Binomial[k,i]x^(n i),{i,0,2}]/( 1-k x^(2n)),{n,mx}]; CoefficientList[Series[gf[x,4],{x,0,mx}],x] (* Herbert Kociemba, Nov 29 2016 *)

Formula

a(n) = Sum_{d|n} mu(d)*A056486(n/d).
From Herbert Kociemba, Nov 29 2016: (Start)
More generally, gf(k) is the g.f. for the number of necklaces with reflectional symmetry but no rotational symmetry and beads of k colors.
gf(k): Sum_{n>=1} mu(n)*Sum_{i=0..2} binomial(k,i)x^(n*i)/(1-k*x^(2*n)). (End)
Showing 1-7 of 7 results.