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

A131473 a(n) = n^6 - n.

Original entry on oeis.org

0, 0, 62, 726, 4092, 15620, 46650, 117642, 262136, 531432, 999990, 1771550, 2985972, 4826796, 7529522, 11390610, 16777200, 24137552, 34012206, 47045862, 63999980, 85766100, 113379882, 148035866, 191102952, 244140600, 308915750
Offset: 0

Views

Author

Mohammad K. Azarian, Jul 27 2007

Keywords

Crossrefs

Programs

A219619 a(n) = n! * (n^4 + n^2 + 1).

Original entry on oeis.org

1, 3, 42, 546, 6552, 78120, 959760, 12353040, 167771520, 2410611840, 36654508800, 589291718400, 10002032409600, 178908534604800, 3366215358105600, 66496549287168000, 1376573115101184000, 29810519036153856000, 674176353586864128000, 15896946656727392256000
Offset: 0

Views

Author

Franz Vrabec, Nov 24 2012

Keywords

Comments

Sum_{n>=0} 1/a(n) = e/2.

Examples

			a(3) = 3!*(3^4 + 3^2 + 1) = 6*91 = 546.
		

Crossrefs

Cf. A000142 (n!), A059826 (n^4 + n^2 + 1).

Programs

  • Mathematica
    Array[#!*(#^4 + #^2 + 1) &, 20, 0] (* Michael De Vlieger, Jan 29 2021 *)
    nmax = 20; CoefficientList[Series[(1 - 2*x + 16*x^2 + 6*x^3 + 3*x^4) / (1 - x)^5, {x, 0, nmax}], x] * Range[0, nmax]! (* Vaclav Kotesovec, Jan 29 2021 *)
  • PARI
    a(n) = n! * (n^4 + n^2 + 1); \\ Michel Marcus, Nov 19 2017
    
  • PARI
    first(n) = { my(x='x+O('x^n)); Vec(serlaplace((-3*x^4-6*x^3-16*x^2+2*x-1)/(x-1)^5)); } \\ Iain Fox, Nov 19 2017

Formula

a(n) = A000142(n)*A059826(n). - Michel Marcus, Nov 19 2017
E.g.f.: (-3*x^4 - 6*x^3 - 16*x^2 + 2*x - 1)/(x - 1)^5. - Iain Fox, Nov 19 2017

A257874 Numbers n such that the largest prime divisor of n^4 + n^2 + 1 is equal to the largest prime divisor of (n+1)^4 + (n+1)^2 + 1.

Original entry on oeis.org

3, 6, 8, 10, 12, 15, 17, 21, 24, 27, 31, 33, 38, 41, 43, 48, 50, 52, 54, 57, 59, 62, 66, 69, 71, 73, 75, 78, 80, 82, 85, 90, 93, 95, 97, 99, 101, 103, 105, 111, 115, 117, 119, 124, 127, 131, 133, 136, 138, 141, 143, 145, 147, 150, 153, 155, 157, 162, 164, 168
Offset: 1

Views

Author

Michel Lagneau, May 11 2015

Keywords

Comments

The sequence is infinite. Proof:
Let p(n) denote the largest prime divisor of n^4 + n^2 + 1 and let q(n) denote the largest prime divisor of n^2 + n + 1. Then p(n) = q(n^2), and from
n^4 + n^2 + 1 = (n^2+1)^2 - n^2 = (n^2-n+1)(n^2+n+1)= ((n-1)^2 + (n-1)+1)(n^2+n+1) it follows that p(n) = max{q(n),q(n-1)} for n>=2.
Keeping in mind that n^2-n+1 is odd, we have
gcd(n^2+n+1,n^2-n+1) = gcd(2n,n^2-n+1)= gcd(n,n^2-n+1)= 1.
Therefore q(n) is different from q(n-1).
To prove the result, it suffices to show that the set
S = {n in Z | n>=2 and q(n) > q(n-1) and q(n) > q(n+1)}
is infinite, since for each n in S one has
p(n) = max{q(n),q(n-1)} = q(n) = max{q(n),q(n+1)} = p(n+1).
Suppose on the contrary that S is finite. Since q(2) = 7 < 13 = q(3) and q(3) = 13 > 7 = q(4), the set S is nonempty. Since it is finite, we can consider its largest element, say m.
Note that it is impossible that q(m)>q(m+1)>q(m+2)>... because all these numbers are positive integers, so there exists a number k>=m such that q(k)= k+1 such that q(l)>q(l+1). By the minimality of l, we have q(l-1)= k + 1 > k >= m, this contradicts the maximality of m, and hence S is indeed infinite.

Examples

			3 is in the sequence because 3^4+3^2+1 = 91 = 13*7 and 4^4+4^2+1 = 273 = 13*7*3, so 13 is the greatest prime factor of both expressions.
		

Crossrefs

Programs

  • Maple
    with(numtheory):for n from 1 to 400 do:x1:=n^4 + n^2 + 1:x2:=(n+1)^4 + (n+1)^2+1:y1:=factorset(x1):n1:=nops(y1):y2:=factorset(x2):n2:=nops(y2):if y1[n1]=y2[n2] then printf(`%d, `,n):else fi:od:
  • Mathematica
    fQ[n_]:=Last[FactorInteger[n^4+n^2+1]][[1]]==Last[FactorInteger[(n+1)^4+(n+1)^2+1]][[1]];Select[Range[168],fQ[#]&] (* Ivan N. Ianakiev, Jun 11 2015 *)
    SequencePosition[Table[FactorInteger[n^4+n^2+1][[-1,1]],{n,200}],{x_,x_}][[;;,1]] (* Harvey P. Dale, Nov 06 2024 *)
  • PARI
    gpf(n)=if(n<4, return(n)); my(f=factor(n)[,1]); f[#f]
    is(n)=my(a=n^4+n^2+1, b=(n+1)^4 +(n+1)^2+1, g=gcd(a,b), p=gpf(g)); g>1 && p>=gpf(a/g) && p>=gpf(b/g) \\ Charles R Greathouse IV, May 11 2015

A260534 Square array read by ascending antidiagonals, T(n,k) = Sum_{j=0..k} n^j*(C(k-j,j) mod 2).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 4, 1, 3, 1, 1, 1, 5, 1, 7, 2, 1, 1, 1, 6, 1, 13, 5, 3, 1, 1, 1, 7, 1, 21, 10, 11, 1, 1, 1, 1, 8, 1, 31, 17, 31, 1, 4, 1, 1, 1, 9, 1, 43, 26, 69, 1, 23, 3, 1, 1, 1, 10, 1, 57, 37, 131, 1, 94, 21, 5, 1, 1, 1, 11
Offset: 0

Views

Author

Peter Luschny, Sep 20 2015

Keywords

Comments

A parametrization of Stern's diatomic series (which is here T(1,k)). (For other generalizations of Dijkstra's fusc function see the Luschny link.)

Examples

			Array starts:
n\k[0, 1,  2, 3,  4,  5,   6, 7,    8,    9,    10]
[0] 1, 1,  1, 1,  1,  1,   1, 1,    1,    1,     1, ...
[1] 1, 1,  2, 1,  3,  2,   3, 1,    4,    3,     5, ... [A002487]
[2] 1, 1,  3, 1,  7,  5,  11, 1,   23,   21,    59, ... [A101624]
[3] 1, 1,  4, 1, 13, 10,  31, 1,   94,   91,   355, ...
[4] 1, 1,  5, 1, 21, 17,  69, 1,  277,  273,  1349, ... [A101625]
[5] 1, 1,  6, 1, 31, 26, 131, 1,  656,  651,  3881, ...
[6] 1, 1,  7, 1, 43, 37, 223, 1, 1339, 1333,  9295, ...
[7] 1, 1,  8, 1, 57, 50, 351, 1, 2458, 2451, 19559, ...
[8] 1, 1,  9, 1, 73, 65, 521, 1, 4169, 4161, 37385, ...
-,-,-,-,A002061,A002522,A071568,-,-,A059826,-,A002523,
		

Crossrefs

Programs

  • Maple
    T := (n,k) -> add(modp(binomial(k-j,j),2)*n^j, j=0..k):
    seq(lprint(seq(T(n,k),k=0..10)),n=0..5);
  • Mathematica
    Table[If[(n - k) == 0, 1, Sum[(n - k)^j Mod[Binomial[k - j, j], 2], {j, 0, k}]], {n, 0, 10}, {k, 0, n}] (* Michael De Vlieger, Sep 21 2015 *)
  • Python
    def A260534_T(n,k):
        return sum(0 if ~(k-j) & j else n**j for j in range(k+1)) # Chai Wah Wu, Feb 08 2016

A203173 Central polygonal numbers that are nontrivially the product of two central polygonal numbers.

Original entry on oeis.org

21, 91, 273, 651, 931, 1333, 2451, 3783, 4161, 4557, 6643, 10101, 14763, 20881, 22351, 28731, 31863, 38613, 50851, 52671, 65793, 83811, 99541, 105301, 130683, 139503, 160401, 194923, 221371, 234741, 235711, 280371, 316407, 332353, 391251, 427063, 457653, 532171, 615441
Offset: 1

Views

Author

Keywords

Comments

Central polygonal numbers are those of the form n^2-n+1, or equivalently n^2+n+1. We exclude factorizations where one of the factors is 1.

Examples

			21 = 4^2+4+1 = 7*3 = (2^2+2+1)*(1^2+1+1), so 21 is in the sequence.
		

Crossrefs

Cf. A002061 (central polygonal numbers), A059826 (a subsequence except for first two terms).

Programs

  • PARI
    iscpn(n)=local(r=sqrtint(n-1));n==r^2+r+1
    iscpnprod(n)=local(x,y);for(i=1,n,x=i^2+i+1;y=n\x;if(x>y,return(0));if(n==x*y&&iscpn(y),return(1)));0
    ap(n)=for(k=1,n,if(iscpnprod(k^2+k+1),print1(k^2+k+1", ")))

A241855 Array t(n,k) of sum of successive even powers of primes, where t(n,k) = sum_(j=0..k-1) prime(n)^(2j), with n>=1 and k>=0, read by ascending antidiagonals.

Original entry on oeis.org

0, 0, 1, 0, 1, 5, 0, 1, 10, 21, 0, 1, 26, 91, 85, 0, 1, 50, 651, 820, 341, 0, 1, 122, 2451, 16276, 7381, 1365, 0, 1, 170, 14763, 120100, 406901, 66430, 5461, 0, 1, 290, 28731, 1786324, 5884901, 10172526, 597871, 21845, 0, 1, 362, 83811, 4855540, 216145205, 288360150, 254313151, 5380840, 87381
Offset: 1

Views

Author

Jean-François Alcover, Apr 30 2014

Keywords

Comments

Conjecture: any term, except 0 and 1, is never a square.
Row n=1 is A002450,
row n=2 is A002452,
row n=3 is A218728,
row n=4 is A218753,
rows n>=5 are not in the OEIS,
column k=2 is A066872,
columns k>=3 are not in the OEIS.

Examples

			Array begins:
0,  1,   5,    21,      85,       341,        1365, ...
0,  1,  10,    91,     820,      7381,       66430, ...
0,  1,  26,   651,   16276,    406901,    10172526, ...
0,  1,  50,  2451,  120100,   5884901,   288360150, ...
0,  1, 122, 14763, 1786324, 216145205, 26153569806, ...
etc.
		

Crossrefs

Programs

  • Mathematica
    t[n_, k_] := ((Prime[n]^2)^k-1)/(Prime[n]^2-1); Table[t[n-k+1, k], {n, 0, 10}, {k, 0, n}] // Flatten

Formula

t(n,k) = ((prime(n)^2)^k-1)/(prime(n)^2-1).
Previous Showing 11-16 of 16 results.