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

A185395 a(3n) = n^2, a(3n+1) = a(3n+2) = 3*n*(n+1)/2.

Original entry on oeis.org

0, 0, 0, 1, 3, 3, 4, 9, 9, 9, 18, 18, 16, 30, 30, 25, 45, 45, 36, 63, 63, 49, 84, 84, 64, 108, 108, 81, 135, 135, 100, 165, 165, 121, 198, 198, 144, 234, 234, 169, 273, 273, 196, 315, 315, 225, 360, 360, 256
Offset: 0

Views

Author

Philippe Deléham, Jan 21 2012

Keywords

Comments

Expansion of ((x+x^2)/(1-x^3))^k with k = 3 ; for k = 1 see A011655, for k = 2 see A186731, for k = 4 see A185292.

Crossrefs

Column k = 3 of triangle in A198295.

Programs

  • Mathematica
    LinearRecurrence[{0,0,3,0,0,-3,0,0,1},{0,0,0,1,3,3,4,9,9},50] (* Harvey P. Dale, Jan 23 2013 *)
  • PARI
    x='x+O('x^50); concat([0, 0, 0], Vec((x*(1+x)/(1-x^3))^3)) \\ G. C. Greubel, Jun 29 2017

Formula

G.f.: (x*(1+x)/(1-x^3))^3.
From Amiram Eldar, May 10 2025: (Start)
Sum_{n>=3} 1/a(n) = Pi^2/6 + 4/3.
Sum_{n>=3} (-1)^(n+1)/a(n) = Pi^2/12 (A072691). (End)

A186731 a(3n) = 2n, a(3n+1) = n, a(3n+2) = n+1.

Original entry on oeis.org

0, 0, 1, 2, 1, 2, 4, 2, 3, 6, 3, 4, 8, 4, 5, 10, 5, 6, 12, 6, 7, 14, 7, 8, 16, 8, 9, 18, 9, 10, 20, 10, 11, 22, 11, 12, 24, 12, 13, 26, 13, 14, 28, 14, 15, 30, 15, 16, 32, 16, 17, 34, 17, 18, 36, 18, 19, 38, 19, 20, 40, 20, 21, 42, 21, 22, 44, 22, 23, 46, 23, 24, 48
Offset: 0

Views

Author

Philippe Deléham, Jan 21 2012

Keywords

Crossrefs

Column k = 2 of triangle in A198295.

Programs

  • Magma
    I:=[0,0,1,2,1,2]; [n le 6 select I[n] else 2*Self(n-3)-Self(n-6): n in [1..80]]; // Vincenzo Librandi, Apr 28 2015
    
  • Maple
    f:= gfun:-rectoproc({a(n)=2*a(n-3)-a(n-6), seq(a(i) = [0,0,1,2,1,2][i+1],i=0..5)},a(n),remember):
    map(f, [$0..100]); # Robert Israel, Apr 01 2016
  • Mathematica
    CoefficientList[Series[(x*(1 + x)/(1 - x^3))^2, {x, 0, 100}], x] (* Wesley Ivan Hurt, Apr 28 2015 *)
    LinearRecurrence[{0, 0, 2, 0, 0, -1}, {0, 0, 1, 2, 1, 2}, 100] (* Vincenzo Librandi, Apr 28 2015 *)
  • PARI
    vector(50,n,n--;(n+1+n*0^(n%3)-(n+1)%3)/3) \\ Derek Orr, Apr 28 2015

Formula

G.f.: (x*(1+x)/(1-x^3))^2.
a(n) = |A099254(n-2)| = |A099470(n-1)|. - R. J. Mathar, May 02 2013
From Wesley Ivan Hurt, Apr 28 2015: (Start)
a(n) = 2*a(n-3)-a(n-6).
a(n) = (n+1+n*0^mod(n,3)-mod(n+1,3))/3. (End)
E.g.f.: (4/9)*x*exp(x) - (x/9)*exp(-x/2)*cos(sqrt(3)*x/2) - (sqrt(3)/9)*(2+x)*exp(-x/2)*sin(sqrt(3)*x/2). - Robert Israel, Apr 01 2016
From Ridouane Oudra, Nov 24 2024: (Start)
a(n) = n^3/6 - n/6 - (n^2 + 3*n/2 - 5/2)*floor(n/3) + (3*n/2 + 9/2)*floor(n/3)^2.
a(n) = t(n+1)*t(n+3) - t(n-1)*t(n+1), where t(n) = A002264(n).
a(n) = A008130(n+1) - A008130(n-1). (End)
Sum_{n>=2} (-1)^n/a(n) = 3*log(2)/2. - Amiram Eldar, May 10 2025

Extensions

More terms from Vincenzo Librandi, Apr 28 2015

A198295 Riordan array (1, x*(1+x)/(1-x^3)).

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 0, 2, 1, 0, 1, 1, 3, 1, 0, 1, 2, 3, 4, 1, 0, 0, 4, 4, 6, 5, 1, 0, 1, 2, 9, 8, 10, 6, 1, 0, 1, 3, 9, 17, 15, 15, 7, 1, 0, 0, 6, 9, 24, 30, 26, 21, 8, 1, 0, 1, 3, 18, 26, 51, 51, 42, 28, 9, 1
Offset: 0

Views

Author

Philippe Deléham, Jan 26 2012

Keywords

Comments

Triangle T(n,k), read by rows, given by (0, 1, -1, -1, 2, -1, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938.
Antidiagonals sums: see A159284.

Examples

			Triangle begins:
1
0, 1
0, 1, 1
0, 0, 2, 1
0, 1, 1, 3, 1
0, 1, 2, 3, 4, 1
0, 0, 4, 4, 6, 5, 1
0, 1, 2, 9, 8, 10, 6, 1
0, 1, 3, 9, 17, 15, 15, 7, 1
		

References

  • A. Luzón, D. Merlini, M. A. Morón, R. Sprugnoli, Complementary Riordan arrays, Discrete Applied Mathematics, 172 (2014) 75-87.

Crossrefs

Cf. Diagonals: A000012, A001477, A161680, A000125.

Formula

Sum_{k, 0<=k<=n} T(n,k) = A001590(n+2), n>0.
Sum_{k, 0<=k<=n}T(n,k)*(-1)^(n-k) = A078056(n-1), n>0.
T(n,n) = A000012(n), T(n+1,n) = A001477(n) = n, T(n+2,n) = A161680(n) = A000217(n-1); T(n+3,n) = A000125(n-1), n>=1.
G.f.: (-1+x)*(1+x+x^2)/(-1+x^3+x*y+x^2*y). - R. J. Mathar, Aug 11 2015

A282686 Least sum of two proper prime powers (A246547) that is the product of n distinct primes.

Original entry on oeis.org

13, 33, 130, 966, 14322, 81510, 3530730, 117535110, 2211297270, 131031070170, 1295080356570, 163411918786830, 3389900689405230, 414524121952915590, 2951531806477464210, 754260388389042905370
Offset: 1

Views

Author

Altug Alkan, Feb 20 2017

Keywords

Comments

Least value of A225102 that is the product of n distinct primes.
From Jon E. Schoenfield, Mar 18 2017: (Start)
For each n, we can write a(n) = p^j + q^k where p and q are prime and 2 <= j <= k; since a(n) is squarefree, p and q are distinct.
Suppose j and k are both even. Then a(n) cannot have any prime factor f such that f == 3 (mod 4) (see A002145). Thus, a(n) is the product of n distinct terms of {2, 5, 13, 17, 29, 37, 41, ...} = A002313, so a(n) >= Product_{i=1..n} A002313(i) = A185952(n).
In fact, however, a(n) < A185952(n) for n = 4..15, and it seems nearly certain that this holds for all n > 3. In any case, if we search for a(n) by generating products of n distinct primes and, for each such product P, testing whether there exists a solution for P = p^j + q^k, then we need not consider solutions in which both j and k are even unless P >= A185952(n).
Additionally, since the sum of any two cubes that is divisible by 3 is also divisible by 9 (hence nonsquarefree), any P that is divisible by 3 cannot be the sum of two cubes, so the exponents j and k cannot both be divisible by 3. (Every P < 2*5*7*11*...*prime(n+1) = A002110(n+1)/3 is divisible by 3.) Thus, for every P that is divisible by 3 and < A185292(n), we can rule out every ordered pair (j,k) except (2,3) and (3,4) (which could be tested together by computing t = P - r^3 for each prime r < P^(1/3) and, if t is square, checking whether sqrt(t) is a prime or the square of a prime) and those with k >= 5 (which could be tested by checking whether t = P - q^k is a prime power for each prime power q^k that is less than P and has k >= 5). (End)
a(17) <= 63985284333636413237490 = 2 * 3 * 5 * 7 * 11 * 13 * 17 * 19 * 23 * 29 * 37 * 41 * 43 * 59 * 61 * 103 * 409 = 10461281^3 + 250679912393^2. - Jon E. Schoenfield, Mar 31 2017

Examples

			a(1) = 13 = 2^2 + 3^2.
a(2) = 33 = 5^2 + 2^3 = 3 * 11.
a(3) = 130 = 3^2 + 11^2 = 2 * 5 * 13.
a(4) = 966 = 5^3 + 29^2 = 2 * 3 * 7 * 23.
a(5) = 14322 = 17^3 + 97^2 = 2 * 3 * 7 * 11 * 31.
a(6) = 81510 = 29^3 + 239^2 = 2 * 3 * 5 * 11 * 13 * 19.
a(7) = 3530730 = 41^4 + 89^3 = 2 * 3 * 5 * 7 * 17 * 23 * 43.
a(8) = 117535110 = 461^3 + 4423^2 = 2 * 3 * 5 * 7 * 11 * 17 * 41 * 73.
From _Jon E. Schoenfield_, Mar 14 2017: (Start)
a(9) = 2211297270 = 1301^3 + 3037^2 = 2 * 3 * 5 * 7 * 13 * 17 * 29 * 31 * 53.
a(10) = 131031070170 = 1361^3 + 358483^2 = 2 * 3 * 5 * 7 * 11 * 13 * 17 * 43 * 47 * 127. (End)
From _Giovanni Resta_, Mar 14 2017: (Start)
a(11) = 810571^2 + 8609^3,
a(12) = 12694849^2 + 13109^3. (End)
From _Jon E. Schoenfield_, Mar 18 2017: (Start)
a(13) = 24537703^2 + 140741^3.
a(14) = 639414679^2 + 178349^3.
a(15) = 1632727069^2 + 658649^3. (End)
a(16) = 1472015189^2 + 9094049^3. - _Jon E. Schoenfield_, Mar 19 2017
		

Crossrefs

Programs

  • Maple
    N:= 1.2*10^8: # to get all terms <= N
    PP:= {seq(seq(p^k,k=2..floor(log[p](N))), p = select(isprime, [2,seq(i,i=3..floor(sqrt(N)),2)]))}:
    PP:= sort(convert(PP,list)):
    A:= 'A':
    for i from 1 to nops(PP) do
      for j from 1 to i do
         Q:= PP[i]+PP[j];
         if Q > N then break fi;
         F:= ifactors(Q)[2];
         if max(seq(f[2],f=F))>1 then next fi;
         m:= nops(F);
         if not assigned(A[m]) or A[m] > Q then A[m]:= Q fi
    od od:
    seq(A[i],i=1..max(map(op,[indices(A)]))); # Robert Israel, Mar 01 2017
  • Mathematica
    (* first 8 terms *) mx = 1.2*^8; a = 0 Range[8] + mx; p = Sort@ Flatten@ Table[ p^Range[2, Log[p, mx]], {p, Prime@ Range@ PrimePi@ Sqrt@ mx}]; Do[ j=1; While[j <= i && (v = p[[i]] + p[[j]]) < mx, f = FactorInteger@v; If[Max[Last /@ f] == 1, c = Length@f; If[c < 9 && v < a[[c]], a[[c]] = v]]; j++], {i, Length@p}]; a (* Giovanni Resta, Mar 19 2017 *)
  • PARI
    do(lim)=my(v=List(),u=v,t,f); t=1; for(i=1,lim, t*=prime(i); if(t>lim,break); listput(v, oo)); v=Vec(v); for(e=2,logint(lim\=1,2), forprime(p=2,sqrtnint(lim-4,e), listput(u,p^e))); u=Set(u); for(i=1,#u, for(j=1,i, t=u[i]+u[j]; if(t>lim, break); f=factor(t)[,2]; if(vecmax(f)==1 && tif(k==oo,"?",k), v) \\ Charles R Greathouse IV, Mar 19 2017
    
  • PARI
    do(lim)=my(v=List(),u=v,t,f,p2); t=1; for(i=1,lim, t*=prime(i); if(t>lim,break); listput(v, oo)); v=Vec(v); for(e=3,logint(lim\=1,2), forprime(p=2,sqrtnint(lim-4,e), listput(u,p^e))); u=Set(u); for(i=1,#u, for(j=1,i, t=u[i]+u[j]; if(t>lim, break); f=factor(t)[,2]; if(vecmax(f)==1 && tlim, break); f=factor(t)[,2]; if(vecmax(f)==1 && tlim, break); f=factor(t)[,2]; if(vecmax(f)==1 && tif(k==oo,"?",k), v) \\ Charles R Greathouse IV, Mar 19 2017

Extensions

a(7)-a(8) from Giovanni Resta, Feb 21 2017
a(9)-a(10) from Jon E. Schoenfield, Mar 14 2017
a(11)-a(12) from Giovanni Resta, Mar 14 2017
a(13)-a(15) from Jon E. Schoenfield, Mar 18 2017
a(16) from Jon E. Schoenfield, Mar 19 2017
Showing 1-4 of 4 results.