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

A006278 a(n) is the product of the first n primes congruent to 1 (mod 4).

Original entry on oeis.org

5, 65, 1105, 32045, 1185665, 48612265, 2576450045, 157163452745, 11472932050385, 1021090952484265, 99045822390973705, 10003628061488344205, 1090395458702229518345, 123214686833351935572985
Offset: 1

Views

Author

Gene_Salamin(AT)cohr.com

Keywords

Comments

a(n)+2 is prime for n=1,2. No others are prime for n <= 200. Compare A002110 and A078586. - T. D. Noe, Dec 01 2002
Also, a(n) is least hypotenuse of exactly A003462(n) Pythagorean triangles of which 2^(n-1) are primitive. - Lekraj Beedassy, Dec 06 2003
Also, a(n) are the record setting values of m, for the number of solutions to "m*k-1 is a square", for some k, 1 <= k < m. There is one solution for m=2, and for a given m = a(n) there are 2^n solutions. For a given m there also 2^(n-1) solutions for primitively representing m as x^2 + y^2. See A008782. Also compare with A102476, which applies to "m*k+1 is a square". - Richard R. Forberg, Mar 18 2016
a(n) is the smallest m such that A000089(m) = 2^n. Also, numbers k for which A000089(k) sets a new record. - Jianing Song, Apr 27 2019

Crossrefs

Programs

  • Mathematica
    maxN=15; pLst={}; k=0; While[Length[pLst]Harvey P. Dale, Jun 16 2013 *)
  • PARI
    tree(v)=my(t=#v); if(t<4, factorback(v), tree(v[1..t\2])*tree(v[t\2+1..t]));
    a(n,x=9*n\4+2)=my(P=select(p->p%4==1, primes(x))); if(#PCharles R Greathouse IV, Jan 08 2018

Formula

a(n) = Product_{i=1..n} A002144(i). - Alois P. Heinz, Mar 01 2021

A008781 For any circular arrangement of 0..n-1, let S be the sum of cubes of every sum of two contiguous numbers; then a(n) is the number of distinct values of S.

Original entry on oeis.org

1, 1, 1, 3, 12, 46, 163, 405, 770, 1252, 1921, 2816, 3977, 5464, 7313
Offset: 1

Views

Author

Keywords

Examples

			Consider n = 5: and the circular arrangements of {0,1,2,3,4}. Here are the values of [ A, B, C, D, E ] (A+B)^3 + (B+C)^3 +(C+D)^3 +(D+E)^3 +(E+A)^3:
[0,1,2,3,4], (0+1)^3 + (1+2)^3 +(2+3)^3 +(3+4)^3 +(4+0)^3 = 560;
[0,1,2,4,3], (0+1)^3 + (1+2)^3 +(2+4)^3 +(4+3)^3 +(3+0)^3 = 614;
[0,1,3,2,4], (0+1)^3 + (1+3)^3 +(3+2)^3 +(2+4)^3 +(4+0)^3 = 470;
[0,1,4,2,3], (0+1)^3 + (1+4)^3 +(4+2)^3 +(2+3)^3 +(3+0)^3 = 494;
[0,1,3,4,2], (0+1)^3 + (1+3)^3 +(3+4)^3 +(4+2)^3 +(2+0)^3 = 632;
[0,1,4,3,2], (0+1)^3 + (1+4)^3 +(4+3)^3 +(3+2)^3 +(2+0)^3 = 602;
[0,2,1,3,4], (0+2)^3 + (2+1)^3 +(1+3)^3 +(3+4)^3 +(4+0)^3 = 506;
[0,2,1,4,3], (0+2)^3 + (2+1)^3 +(1+4)^3 +(4+3)^3 +(3+0)^3 = 530;
[0,3,1,2,4], (0+3)^3 + (3+1)^3 +(1+2)^3 +(2+4)^3 +(4+0)^3 = 398;
[0,4,1,2,3], (0+4)^3 + (4+1)^3 +(1+2)^3 +(2+3)^3 +(3+0)^3 = 368;
[0,3,1,4,2], (0+3)^3 + (3+1)^3 +(1+4)^3 +(4+2)^3 +(2+0)^3 = 440;
[0,4,1,3,2], (0+4)^3 + (4+1)^3 +(1+3)^3 +(3+2)^3 +(2+0)^3 = 386;
There are 12 different values, so a(5) = 12.
		

Crossrefs

Programs

  • Maple
    A008781 := proc(n)
        local msu,p,c,i ;
        msu := {} ;
        for p in combinat[permute](n-1) do
            c := [0,op(p)] ;
            s := 0 ;
            for i from 0 to n-1 do
                s := s+(c[i+1]+c[1+modp(i+1,n)])^3 ;
            end do:
            msu := msu union {s} ;
        end do:
        nops(msu) ;
    end proc: # R. J. Mathar, Jul 18 2017
  • Mathematica
    f[perm_] := Total[#]^3& /@ Partition[Join[{0}, perm, {0}], 2, 1] // Total;
    a[n_] := a[n] = f /@ Permutations[Range[n - 1]] // Union // Length;
    Reap[Do[Print[n, " ", a[n]]; Sow[a[n]], {n, 1, 12}]][[2, 1]] (* Jean-François Alcover, Feb 24 2020 *)

Extensions

Corrected by Naohiro Nomoto, Sep 10 2001
More terms from Vit Planocka (planocka(AT)mistral.cz), Sep 29 2002
a(12) from Alois P. Heinz, May 26 2013
a(13)-a(15) from Sean A. Irvine, Apr 04 2018
Showing 1-2 of 2 results.