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

A026469 a(1) = 1; for n > 1, a(n) = least positive integer > a(n-1) and not equal to a(i)^2 + a(j)^2 for 1<=i<=j<=n-1.

Original entry on oeis.org

1, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 19, 20, 21, 22, 23, 24, 27, 28, 29, 30, 31, 33, 35, 36, 38, 39, 40, 42, 43, 44, 46, 47, 48, 49, 51, 53, 54, 55, 56, 57, 59, 60, 62, 63, 64, 66, 67, 68, 69, 70, 71, 75, 76, 77, 78, 79
Offset: 1

Views

Author

Keywords

Crossrefs

A022544 is a subsequence.
Cf. A026468.

Programs

  • Maple
    # return true if 'candid' is allowed (not a sum of squares)
    A026469aux := proc(a,candid) local i,j ; for j from 1 to nops(a) do for i from 1 to j do if (op(i,a))^2+(op(j,a))^2 = candid then RETURN(false) ; fi ; od ; od ; RETURN(true) ; end:
    A026469 := proc(nmax) local a,candidat ; a := [1] ; while nops(a) < nmax do candidat := op(nops(a),a)+1 ; while A026469aux(a,candidat) = false do candidat := candidat+1 ; od ; a := [op(a),candidat] ; od: RETURN(a) ; end: A026469(60) ; # R. J. Mathar, Nov 01 2006

Extensions

Corrected by Franklin T. Adams-Watters, Oct 25 2006
Definition corrected by N. J. A. Sloane, Nov 01 2006

A008320 Smallest number that is not the sum of squares of two distinct earlier terms.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 8, 9, 11, 12, 14, 15, 16, 18, 19, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 38, 39, 41, 42, 43, 44, 46, 47, 48, 49, 51, 54, 55, 56, 57, 59, 60, 61, 62, 63, 64, 66, 67, 69, 70, 71, 72, 74, 75, 76, 77, 78, 79, 81, 83, 84, 86, 87, 88, 89, 91, 92, 93, 94
Offset: 1

Views

Author

R. Muller

Keywords

Crossrefs

A026468 is the version without "distinct".

Programs

  • Mathematica
    FixedPoint[Complement[Range@100, Flatten@Table[#[[i]]^2 + #[[j]]^2, {i, Length[#]}, {j, i - 1}]] &, {}] (* Ivan Neretin, Jun 05 2016 *)

Extensions

More terms from David W. Wilson

A261604 a(1)=0. For n>1, a(n) = smallest number > a(n-1) such that, for all m,r

Original entry on oeis.org

0, 1, 3, 4, 5, 6, 7, 8, 11, 12, 13, 14, 15, 19, 20, 21, 22, 23, 24, 27, 28, 29, 30, 31, 33, 35, 38, 39, 40, 42, 43, 44, 46, 47, 48, 51, 53, 54, 55, 56, 57, 59, 60, 62, 63, 66, 67, 68, 69, 70, 71, 75, 76, 77, 78, 79, 81, 82, 83, 84, 86, 87, 88
Offset: 1

Views

Author

Anders Hellström, Aug 25 2015

Keywords

Crossrefs

A022544 is a subsequence.

Programs

  • PARI
    issumsq(n,r,s)=(r^2)+(s^2)==n
    first(m)=my(v=vector(m), x, r, n, s); v[1]=0; for(n=2, m, v[n]=v[n-1]+1;until(x==1, for(r=1, n-1, for(s=1, n-1, if(issumsq(v[n],v[r],v[s]), v[n]++; x=0; break(2), x=1))))); v;
    
  • PARI
    isA022544(n)=if(n%4==3, return(1)); my(f=factor(n)); for(i=1,#f~, if(f[i,1]%4==3 && f[i,2]%2, return(1))); 0
    search(v,x)=my(t=setsearch(v,x)); if(t, t, setsearch(v,x,1))
    list(lim)=my(v=List([0,1]),t); for(n=3,lim, if(isA022544(n), listput(v,n); next); for(j=search(v,sqrtint((n-1)\2)+1),search(v,sqrtint(n)), if(issquare(n-v[j]^2, &t) && setsearch(v,t), next(2))); listput(v,n)); Set(v) \\ Charles R Greathouse IV, Sep 01 2015

Formula

a(n) ~ n, and in particular a(n) = n + O(n/sqrt(log n)). I do not know if this bound is tight. - Charles R Greathouse IV, Sep 01 2015
Showing 1-3 of 3 results.