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

A342545 a(n)^2 is the least square that has exactly n 0's in base n.

Original entry on oeis.org

2, 24, 16, 280, 216, 3430, 4096, 19683, 100000, 4348377, 2985984, 154457888, 105413504, 4442343750, 4294967296, 313909084845, 198359290368, 8712567840033, 10240000000000, 500396429346030, 584318301411328, 38112390316557080, 36520347436056576, 298023223876953125
Offset: 2

Views

Author

Hugo Pfoertner, Apr 07 2021

Keywords

Examples

			   n    a(n)         a(n)^2   in base n
   2       2              4   100
   3      24            576   210100
   4      16            256   10000
   5     280          78400   10002100
   6     216          46656   1000000
   7    3430       11764900   202000000
   8    4096       16777216   100000000
   9   19683      387420489   1000000000
  10  100000    10000000000   10000000000
  11 4348377 18908382534129   6030000000000
  12 2985984  8916100448256   1000000000000
		

Crossrefs

Programs

  • PARI
    for(b=2,12,for(k=1,oo,my(s=k^2,v=digits(s,b));if(sum(k=1,#v,v[k]==0)==b,print1(k,", ");break)))
    
  • Python
    from numba import njit
    @njit # works with 64 bits through a(14)
    def digits0(n, b):
      count0 = 0
      while n >= b:
        n, r = divmod(n, b)
        count0 += (r==0)
      return count0 + (n==0)
    from sympy import integer_nthroot
    def a(n):
      an = integer_nthroot(n**n, 2)[0]
      while digits0(an*an, n) != n: an += 1
      return an
    print([a(n) for n in range(2, 13)]) # Michael S. Branicky, Apr 07 2021
    
  • Python
    from itertools import product
    from functools import reduce
    from sympy.utilities.iterables import multiset_permutations
    from sympy import integer_nthroot
    def A342545(n):
        for a in range(1,n):
            p, q = integer_nthroot(a*n**n,2)
            if q: return p
        l = 1
        while True:
            cmax = n**(l+n+1)
            for a in range(1,n):
                c = cmax
                for b in product(range(1,n),repeat=l):
                    for d in multiset_permutations((0,)*n+b):
                        p, q = integer_nthroot(reduce(lambda c, y: c*n+y, [a]+d),2)
                        if q: c = min(c,p)
                if c < cmax:
                    return c
            l += 1 # Chai Wah Wu, Apr 07 2021

Formula

a(2*n) = A062971(n) = 2*A193678(n).

Extensions

More terms from Chai Wah Wu, Apr 07 2021

A384075 a(n) = neg(M(n)), where M(n) is the n X n circulant matrix with (row 1) = (1,3,5,7, ..., 2n - 1), and neg(M(n)) is the negative part of the determinant of M(n); see A380661.

Original entry on oeis.org

0, -9, -45, -4716, -200200, -20916552, -2462535768, -406262340288, -84096850828032, -21708790967664000, -6808563893605222144, -2552145158372103507456, -1126589571631974396251136, -578462264691449080954733568, -341831891354409385226121600000
Offset: 1

Views

Author

Clark Kimberling, May 22 2025

Keywords

Examples

			The rows of M(4) are (1,3,5,7), (7,1,3,5), (5,7,1,3), (3,5,7,1); determinant(M(4)) = -4716; permanent(M(4)) = 2668, so neg(M(4)) = (-2048 - 7384)/2 = -4716 and pos(M(4)) = (-2048 + 7384)/2 = 2668.
		

Crossrefs

Cf. A193678 (determinant), A384074 (permanent), A380661, A384076, A384077, A384078.

Programs

  • Mathematica
    z = 19;
    v[n_] := Table[2 k + 1, {k, 0, n - 1}];
    u[n_] := Table[RotateRight[#, k - 1], {k, 1, Length[#]}] &[v[n]];
    p = Table[Simplify[Permanent[u[n]]], {n, 1, z}]   (* A384074  *)
    d = Table[Simplify[Det[u[n]]], {n, 1, z}]  (* A193678, with alternating signs *)
    neg = (d - p)/2   (* A384075 *)
    pos = (d + p)/2   (* A384076 *)

Formula

a(n) = (1/2)*((-1)^n*A193678(n) - A384074(n)).

A193681 Discriminant of minimal polynomial of 2*cos(Pi/n) (see A187360).

Original entry on oeis.org

1, 1, 1, 8, 5, 12, 49, 2048, 81, 2000, 14641, 2304, 371293, 1075648, 1125, 2147483648, 410338673, 1259712, 16983563041, 1024000000, 453789, 2414538435584, 41426511213649, 1358954496, 762939453125, 7340688973975552, 31381059609, 4739148267126784, 10260628712958602189, 324000000
Offset: 1

Views

Author

Wolfdieter Lang, Sep 13 2011

Keywords

Comments

For the discriminant of a polynomial in terms of the square of a determinant of a Vandermonde matrix build from the zeros of the polynomial see, e.g., A127670.
The zeros of the polynomials C(n,x) with coefficient triangle A187360 are given there in a comment.
The discriminant of the monic C(n,x) polynomial can also be computed from its zeros x_i and the derivative of C, via (-1)^binomial(delta(n),2)*product(C'(n,x)|_{x=x_i},i=1..delta(n)), with the degree delta(n)=A055034(n). For a reference see, e.g., Rivlin, p. 218, quoted in A127670.

Crossrefs

Programs

  • Maple
    g:= proc(n) local P,z,j;
       P:= factor(evala(Norm(z-convert(2*cos(Pi/n),RootOf))));
       if type(P,`^`) then P:= op(1,P) fi;
       discrim(P,z)
    end proc:
    map(g, [$1..100]); # Robert Israel, Aug 04 2015
  • Mathematica
    Table[NumberFieldDiscriminant[Cos[Pi/m]], {m, 1, z}]  (* Clark Kimberling, Aug 03 2015 *)

Formula

a(n) = discriminant(C(n,x)), n>=1, with C(n,x):=sum(A187360(n,m)*x^m,m=0..A055034(n)), the minimal polynomial of 2*cos(Pi/n).

A317403 a(n)=(-1)^((n-2)*(n-1)/2)*2^(n-1)*n^(n-3).

Original entry on oeis.org

1, 1, -4, -32, 400, 6912, -153664, -4194304, 136048896, 5120000000, -219503494144, -10567230160896, 564668382613504, 33174037869887488, -2125764000000000000, -147573952589676412928, 11034809241396899282944, 884295678882933431599104, -75613185918270483380568064
Offset: 1

Views

Author

Rigoberto Florez, Aug 26 2018

Keywords

Comments

Discriminant of Fibonacci polynomials.
Fibonacci polynomials are defined as F(0)=0, F(1)=1 and F(n)=x*F(n-1)+F(n-2) for n>1. Coefficients are given in triangle A168561 with offset 1.

Crossrefs

Programs

  • Magma
    [(-1)^((n-2)*(n-1) div 2)*2^(n-1)*n^(n-3): n in [1..20]]; // Vincenzo Librandi, Aug 27 2018
  • Mathematica
    Array[(-1)^((#-2)*(#-1)/2)*2^(#-1)*#^(#-3)&,20]
  • PARI
    concat([1], [poldisc(p) | p<-Vec(x/(1-x^2-y*x) - x + O(x^20))]) \\ Andrew Howroyd, Aug 26 2018
    

A317450 a(n)=(-1)^((n-2)*(n-1)/2)*2^((n-1)^2)*n^(n-3).

Original entry on oeis.org

1, 1, -16, -2048, 1638400, 7247757312, -164995463643136, -18446744073709551616, 9803356117276277820358656, 24178516392292583494123520000000, -271732164163901599116133024293512544256, -13717048991958695477963985711266803110069141504, 3074347100178259797134292590832254504315406543889629184
Offset: 1

Views

Author

Rigoberto Florez, Aug 26 2018

Keywords

Comments

Discriminant of Pell polynomials.
Pell polynomials are defined as P(0)=0, P(1)=1 and P(n)=2xP(n-1)+P(n-2) for n>1.

Crossrefs

Programs

  • Mathematica
    Array[(-1)^((#-2)*(#-1)/2)* 2^((#-1)^2)*#^(#-3)&,15]
Previous Showing 11-15 of 15 results.