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

A128542 a(n) = ((2n)^(2n) - 1)/((2n+1)*(2n-1)).

Original entry on oeis.org

0, 1, 17, 1333, 266305, 101010101, 62350352785, 56984650387477, 72340172838076673, 121815504877079063701, 262801002506265664160401, 706890015246831381773595701, 2319540481478754999041880822337, 9120177155862455275254332279111413
Offset: 0

Views

Author

Alexander Adamchuk, May 08 2007

Keywords

Comments

p divides a(p-1) for prime p>3.

Crossrefs

Cf. A048861 = n^n - 1.

Programs

  • GAP
    Concatenation([0], List([1..20], n-> ((2*n)^(2*n)-1)/(4*n^2 -1) )); # G. C. Greubel, Jul 11 2019
  • Magma
    [0] cat [((2*n)^(2*n)-1)/(4*n^2 -1): n in [1..20]]; // G. C. Greubel, Jul 11 2019
    
  • Mathematica
    Join[{0}, Table[((2n)^(2n)-1)/(4n^2-1),{n,1,20}]]
  • PARI
    A128542(n)=((n+=n)^n-1)/(n^2-1) \\ M. F. Hasler, Oct 31 2014
    
  • Sage
    [0]+[((2*n)^(2*n)-1)/(4*n^2 -1) for n in (1..20)] # G. C. Greubel, Jul 11 2019
    

Formula

a(n) = ((2n)^(2n)-1)/((2n+1)*(2n-1)).
a(n) = A048861(2n)/((2n+1)*(2n-1)).
a(n) = A023037(2n)/(2n+1).
a(n) = A089815(2n-2).

Extensions

a(0)=0 added by M. F. Hasler, Oct 31 2014

A175151 a(n) = Sum_{i=1..n} ((i+1)^i - 1)/i.

Original entry on oeis.org

1, 5, 26, 182, 1737, 21345, 320938, 5701778, 116812889, 2710555349, 70256770866, 2011763864406, 63066746422417, 2148275748236033, 79009709388692498, 3120334201617871778, 131703367127423550129, 5916556161455825857509, 281857608793034773225930
Offset: 1

Views

Author

Ctibor O. Zizka, Feb 26 2010

Keywords

Crossrefs

Programs

  • Magma
    [(&+[((j+1)^j -1)/j: j in [1..n]]): n in [1..30]]; // G. C. Greubel, Aug 16 2022
    
  • Mathematica
    Accumulate[Table[((i+1)^i-1)/i,{i,20}]] (* Harvey P. Dale, Jul 08 2017 *)
  • SageMath
    [sum(((j+1)^j -1)/j for j in (1..n)) for n in (1..30)] # G. C. Greubel, Aug 16 2022

Formula

a(n) = Sum_{i=1..n+1} A060072(i). - R. J. Mathar, Mar 05 2010
a(n) = Sum_{j=1..n} (j+1)^j/j - H(n), where H(n) is the n-th harmonic number. - G. C. Greubel, Aug 16 2022

Extensions

More terms from R. J. Mathar, Mar 05 2010

A215159 a(n) = floor(n^n / (n+1)).

Original entry on oeis.org

1, 0, 1, 6, 51, 520, 6665, 102942, 1864135, 38742048, 909090909, 23775972550, 685853880635, 21633936185160, 740800455037201, 27368368148803710, 1085102592571150095, 45957792327018709120, 2070863582910344082917, 98920982783015679456198
Offset: 0

Views

Author

Alex Ratushnyak, Aug 04 2012

Keywords

Comments

b(n) = n^n mod (n+1) begins: 0, 1, 1, 3, 1, 5, 1, 7, 1, 9, 1, 11, 1, 13, 1, 15...

Crossrefs

Cf. A060072 is essentially floor((n+1)^n / n).
Cf. A173499 is equal to floor((n-1)^n / n).
Cf. A023037 is essentially floor((n+1)^(n+1) / n).

Programs

  • Magma
    [Floor(n^n/(n+1)): n in [0..30]]; // G. C. Greubel, Aug 16 2022
    
  • Mathematica
    Table[If[n==0, 1, Floor[n^n/(n+1)]], {n,0,30}] (* G. C. Greubel, Aug 16 2022 *)
  • Python
    for n in range(55):
        print(n**n // (n+1), end=",")
    
  • SageMath
    [(n^n//(n+1)) for n in (0..30)] # G. C. Greubel, Aug 16 2022

A328005 Number of distinct coefficients in functional composition of 1 + x + ... + x^(n-1) with itself.

Original entry on oeis.org

0, 1, 2, 4, 8, 13, 19, 25, 33, 41, 51, 61, 73, 85, 99, 113, 129, 145, 163, 181, 201, 221, 243, 265, 289, 313, 339, 365, 393, 421, 451, 481, 513, 545, 579, 613, 649, 685, 723, 761, 801, 841, 883, 925, 969, 1013, 1059, 1105, 1153, 1201, 1251, 1301, 1353, 1405, 1459
Offset: 0

Views

Author

Vladimir Reshetnikov, Oct 01 2019

Keywords

Comments

Sum_{i=0..n-1} x^i = (x^n - 1)/(x - 1).

Examples

			For n = 4, the composition of 1 + x + x^2 + x^3 with itself is 1 + (1 + x + x^2 + x^3) + (1 + x + x^2 + x^3)^2 + (1 + x + x^2 + x^3)^3 = 4 + 6 x + 10 x^2 + 15 x^3 + 15 x^4 + 14 x^5 + 11 x^6 + 6 x^7 + 3 x^8 + x^9 that has 8 distinct coefficients [1, 3, 4, 6, 10, 11, 14, 15], so a(4) = 8.
The first few polynomials p_n(x) are 0, 1, x + 2, x^4 + 2*x^3 + 4*x^2 + 3*x + 3, ... with p_n(1) = A023037(n), n >= 0.
		

Crossrefs

Programs

  • Maple
    f:= n-> unapply(add(x^j, j=0..n-1), x):
    a:= n-> nops({coeffs(expand((f(n)@@2)(x)))} minus {0}):
    seq(a(n), n=0..60);  # Alois P. Heinz, Oct 01 2019
  • Mathematica
    Table[With[{s = Sum[x^k, {k, 0, n - 1}]}, Length[Union[CoefficientList[Expand[s /. x -> s], x]]]], {n, 0, 53}]
  • PARI
    a(n)={my(p=(1-x^n)/(1-x)); #Set(Vec(subst(p,x,p)))} \\ Andrew Howroyd, Oct 01 2019
    
  • SageMath
    def A328005(n):
        R. = PolynomialRing(ZZ)
        q = R(sum(x^k for k in range(n)))
        return len(Set(q.substitute(x=q).list()))
    print([A328005(n) for n in range(55)]) # Peter Luschny, Oct 02 2019

Formula

It appears that a(n) = (2*n^2 + (-1)^n + 3)/4 for n >= 5.
Conjectured g.f.: (x^7 - x^6 - x^5 + 2*x^3 + 1)*x/((x + 1)*(1 - x)^3).

A374173 a(n) is the smallest prime whose base-n representation contains a run of at least n identical digits.

Original entry on oeis.org

3, 13, 683, 3907, 55987, 960803, 19173967, 435848051, 11111111113, 1540683021299, 19453310068921, 328114698808283, 45302797058044219, 469172025408063623, 19676527011956855059, 878942778254232811943, 120353718818554114936591, 109912203092239643840221
Offset: 2

Views

Author

Robert P. P. McKone, Jun 30 2024

Keywords

Comments

a(2) to a(18) are all increasing, but a(19) is smaller than a(18).
a(n) = A023037(n) for n in A088790. - Robert Israel, Dec 31 2024

Examples

			a(2) = 3 = 11_2.
a(3) = 13 = 111_3.
a(11) = 1540683021299 = 544444444444_11.
a(18) = 120353718818554114936591 = 3111111111111111111_18.
a(19) = 109912203092239643840221 = 1111111111111111111_19.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local t,Q,i,j;
      t:= (n^n-1)/(n-1);
      if isprime(t) then return t fi;
      for i from 1 to n-1 do
        Q:= select(isprime, [seq(i*t*n+j,j=1..n-1),
             seq(i*n^n+j*t,j=1..n-1)]);
        if Q <> [] then return min(Q) fi;
      od;
      FAIL
    end proc:
    map(f, [$2..20]); # Robert Israel, Dec 31 2024
  • Mathematica
    d[n_]:=d[n]=Table[Table[m,n],{m,0,n-1}];
    dpre[n_]:=Flatten[Table[{m}~Join~#&/@d[n],{m,0,n-1}],1];
    dpost[n_]:=Flatten[Table[Map[#~Join~{m}&,d[n]],{m,0,n-1}],1];
    dprepost[n_]:=Flatten[Table[Map[{j}~Join~#~Join~{m}&,d[n]],{m,0,n-1},{j,0,n-1}],2];
    c[n_]:=c[n]=DeleteDuplicates[Sort[Select[FromDigits[#,n]&/@Join[d[n],dpre[n],dpost[n],dprepost[n]],#>n&]]];
    a[n_]:=a[n]=Do[If[PrimeQ[q],Return[q];Break[];],{q,c[n]}];
    Table[a[n],{n,2,19}]

A343009 a(n) = (n^(2n)-1)/(n^2-1) for n > 1, a(1) = 1.

Original entry on oeis.org

1, 5, 91, 4369, 406901, 62193781, 14129647351, 4467856773185, 1876182941212489, 1010101010101010101, 678356244890331342611, 555922008415320588345745, 546031727340884622966664381, 633213824057681722185793753109, 856031514432518244055765015738351
Offset: 1

Views

Author

Thomas Ordowski, Apr 02 2021

Keywords

Comments

Conjecture: for n > 2, a(n) is a Fermat pseudoprime to base n.
If p is an odd prime, then a(p) is a Cipolla pseudoprime to base p.
Is a(m) a Fermat pseudoprime to base m for every composite m?
Amiram Eldar confirmed this up to m = 3800.
From Jianing Song, Aug 28 2022: (Start)
a(n) = Product_{d|(2n),d>2} Phi(d,n), where Phi(n,x) is the d-th cyclotomic polynomial. Note that Phi(n,x) > 1 for x >= 2 unless (n,x) = (1,2): suppose that n >= 3 and x >= 2, then Phi(n,x) = Product_{1<=j<=n,gcd(j,n)=1} (x - exp(2*j*Pi*i/n)) = Product_{1<=j<=n/2,gcd(j,n)=1} (x^2 - 2*cos(2*j*Pi/n)*x + 1) = Product_{1<=j<=n/2,gcd(j,n)=1} ((x - cos(2*j*Pi/n))^2 + (sin(2*j*Pi/n))^2) > 1 since x - cos(2*j*Pi/n) > 1. This shows that a(n) is composite for n > 2.
For n > 2, a(n) is a Fermat pseudoprime to base n, since n^(2*n) == 1 (mod a(n)) and 2*n divides a(n)-1 = n^2*(n^(2*n-2)-1)/(n^2-1): if n is even, then 2*n | n^2; if n is odd, then n | n^2 and 2 | n^2+1 = (n^4-1)/(n^2-1) | (n^(2*n-2)-1)/(n^2-1). (End)

Examples

			a(10) = (10^20-1)/99 = 1010101010101010101.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := (n^(2*n)-1)/(n^2-1); a[1] = 1; Array[a, 15] (* Amiram Eldar, Apr 02 2021 *)

Formula

a(n) = Sum_{k=0..n-1} n^(2*k). - Davide Rotondo, Aug 28 2022
From Alois P. Heinz, Aug 28 2022: (Start)
a(n) = A117812(n)/A005563(n-1) = A117812(n)/A132411(n-1) for n>=2.
Limit_{n -> 1} (n^(2*n)-1)/(n^2-1) = 1. (End).

Extensions

More terms from Amiram Eldar, Apr 02 2021
a(1)=1 prepended and name adapted by Alois P. Heinz, Aug 28 2022
Previous Showing 31-36 of 36 results.