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 61-70 of 90 results. Next

A278498 a(n) = A065338(A276573(n)).

Original entry on oeis.org

3, 6, 8, 3, 3, 16, 18, 9, 24, 27, 6, 32, 3, 6, 8, 3, 9, 48, 3, 1, 24, 3, 27, 64, 3, 6, 72, 3, 6, 16, 3, 1, 24, 18, 9, 96, 27, 6, 9, 108, 48, 3, 9, 24, 3, 54, 128, 3, 6, 8, 3, 3, 144, 27, 1, 24, 3, 6, 32, 162, 9, 72, 27, 1, 48, 3, 3, 18, 81, 192, 3, 54, 8, 3, 27, 18, 9, 216, 3, 1, 96, 3, 27, 1, 12, 48, 243, 9, 24, 3, 3, 256, 3, 9, 72, 3, 54, 16, 3, 1, 24, 3, 6
Offset: 1

Views

Author

Antti Karttunen, Nov 25 2016

Keywords

Crossrefs

Programs

Formula

a(n) = A065338(A276573(n)).

A278499 a(n) = A276573(n) modulo 4.

Original entry on oeis.org

0, 3, 2, 0, 3, 3, 0, 2, 1, 0, 3, 2, 0, 3, 2, 0, 3, 1, 0, 3, 1, 0, 3, 3, 0, 3, 2, 0, 3, 2, 0, 3, 1, 0, 2, 1, 0, 3, 2, 1, 0, 0, 3, 1, 0, 3, 2, 0, 3, 2, 0, 3, 3, 0, 3, 1, 0, 3, 2, 0, 2, 1, 0, 3, 1, 0, 3, 3, 2, 1, 0, 3, 2, 0, 3, 3, 2, 1, 0, 3, 1, 0, 3, 3, 1, 0, 0, 3, 1, 0, 3, 3, 0, 3, 1, 0, 3, 2, 0, 3, 1, 0, 3, 2, 0, 3, 2, 0, 2, 1, 0, 2, 1, 0, 3, 2, 0, 3, 2, 0, 3
Offset: 0

Views

Author

Antti Karttunen, Nov 25 2016

Keywords

Comments

No subsequence 2, 3 will ever occur.

Crossrefs

Programs

Formula

a(n) = A010873(A276573(n)) = A276573(n) modulo 4.

A096436 a(n) = the number of squared primes and 1's needed to sum to n.

Original entry on oeis.org

1, 2, 3, 1, 2, 3, 4, 2, 1, 2, 3, 3, 2, 3, 4, 4, 3, 2, 3, 4, 4, 3, 4, 5, 1, 2, 3, 4, 2, 3, 4, 5, 3, 2, 3, 4, 4, 3, 4, 5, 5, 4, 3, 4, 5, 5, 4, 5, 1, 2, 3, 4, 2, 3, 4, 5, 3, 2, 3, 4, 4, 3, 4, 5, 5, 4, 3, 4, 5, 5, 4, 5, 6, 2, 3, 4, 5, 3, 4, 5, 6, 4, 3, 4, 5, 5, 4, 5, 6, 6, 5, 4, 5, 6, 6, 5, 6, 2, 3, 4, 5, 3, 4, 5, 6
Offset: 1

Views

Author

Tom Raes (tommy1729(AT)hotmail.com), Aug 10 2004

Keywords

Comments

a(n) has a new maximum at n=1,2,3,7,24,73,266,795.
I suspect that a(n) <= 9 for all n. - Robert G. Wilson v, Sep 18 2004

Examples

			a(5) = 2 because 5=4+1.
a(17) = 3 because 17=9+4+4.
A number may have many such sums: 27=25+1+1=9+9+9, 50=25+25=49+1.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{d = n, k = PrimePi[ Sqrt[n]], sp = {}}, While[d > 3, While[p = Prime[k]; d >= p^2, AppendTo[sp, p]; d = d - p^2]; k-- ]; While[d != 0, AppendTo[sp, 1]; d = d - 1]; If[Position[sp, 3] != {} && sp[[ -3]] == 1, sp = Delete[Drop[sp, -3], Position[sp, 3][[1]]]; AppendTo[sp, {2, 2, 2}]]; Reverse[ Sort[ Flatten[ sp]]]]; Table[ Length[ f[n]], {n, 105}] (* Robert G. Wilson v, Sep 20 2004 *)

Extensions

Edited and extended by Robert G. Wilson v, Sep 18 2004
Edited by Don Reble, Apr 23 2006

A188462 Least number of 5th powers needed to represent n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
Offset: 1

Views

Author

Jean-François Alcover, Apr 01 2011

Keywords

Comments

Vaughan & Wooley (1995) prove that a(n) <= 17 for large enough n; in fact it is conjectured that a(n) <= 6 for large enough n. The maximum value is a(223) = 37. - Charles R Greathouse IV, Jul 05 2017

Examples

			33 = 2^5 + 1^5 (least decomposition) hence a(33) = 2.
		

Crossrefs

Cf. A002828 (squares), A002376 (cubes), A002377 (4th powers), A374012 (6th powers).

Programs

  • Mathematica
    Cnt5[n_] := Module[{k = 1}, While[Length[PowersRepresentations[n, k, 5]] == 0, k++]; k]; Array[Cnt5, 105] (* T. D. Noe, Apr 01 2011 *)
  • Python
    from itertools import count
    from sympy.solvers.diophantine.diophantine import power_representation
    def A188462(n):
        if n == 1: return 1
        for k in count(1):
            try:
                next(power_representation(n,5,k))
            except:
                continue
            return k # Chai Wah Wu, Jun 25 2024

A193101 Minimal number of numbers of the form (m^3+5m)/6 (see A004006) needed to sum to n.

Original entry on oeis.org

1, 2, 1, 2, 3, 2, 1, 2, 3, 2, 3, 4, 3, 1, 2, 3, 2, 3, 4, 3, 2, 3, 4, 3, 1, 2, 3, 2, 3, 4, 3, 2, 3, 4, 3, 4, 5, 4, 2, 3, 1, 2, 3, 2, 3, 3, 3, 2, 3, 2, 3, 4, 3, 4, 2, 3, 3, 3, 4, 4, 4, 3, 1, 2, 3, 2, 3, 4, 3, 2, 3, 4, 3, 4, 3, 4, 2, 3, 4, 3, 4, 2, 3, 3, 3, 4, 4, 2, 3, 4, 3, 1, 2, 3, 2, 3, 4, 3, 2, 3, 4, 3, 4, 2, 3, 2, 3, 4, 3, 4, 3, 4, 3, 4, 5, 4, 2, 3, 4, 3
Offset: 1

Views

Author

N. J. A. Sloane, Jul 15 2011

Keywords

Comments

Watson showed that a(n) <= 8 for all n.
It is conjectured that a(n) <= 5 for all n.

Crossrefs

Programs

  • Maple
    # LAGRANGE transform of a sequence {a(n)}
    # Suggested by Lagrange's theorem that at most 4 squares are needed to sum to n.
    # Returns b(n) = minimal number of terms of {a} needed to sum to n for 1 <= n <= M.
    # C = maximal number of terms of {a} to try to build n
    # M = upper limit on n
    # Internally, the initial terms of both a and b are taken to be 0, but since this is a number-theoretic function, the output starts at n=1
    LAGRANGE:=proc(a,C,M)
    local t1,ip,i,j,a1,a2,b,c,N1,N2,Nc;
    if whattype(a) <> list then RETURN([]); fi:
    # sort a, remove duplicates, include 0
    t1:=sort(a);
    a1:=sort(convert(convert(a,set),list));
    if not member(0,a1) then a1:=[0,op(a1)]; fi;
    N1:=nops(a1);
    b:=Array(1..M+1,-1);
    for i from 1 to N1 while a1[i]<=M do b[a1[i]+1]:=1; od;
    a2:=a1; N2:=N1;
    for ip from 2 to C do
    c:={}:
       for i from 1 to N1 while a1[i] <= M do
          for j from 1 to N2 while a1[i]+a2[j] <= M do
    c:={op(c),a1[i]+a2[j]};
                                                    od;
                                           od;
    c:=sort(convert(c,list));
    Nc:=nops(c);
       for i from 1 to Nc do
          if b[c[i]+1] = -1 then b[c[i]+1]:= ip; fi;
                          od;
    a2:=c; N2:=Nc;
                       od;
    [seq(b[i],i=2..M+1)];
    end;
    Q:=[seq((m^3+5*m)/6,m=0..20)];
    LAGRANGE(Q,8,120);

A227781 Least number of squares which add to -1 mod n.

Original entry on oeis.org

0, 1, 2, 3, 1, 2, 2, 4, 2, 1, 2, 3, 1, 2, 2, 4, 1, 2, 2, 3, 2, 2, 2, 4, 1, 1, 2, 3, 1, 2, 2, 4, 2, 1, 2, 3, 1, 2, 2, 4, 1, 2, 2, 3, 2, 2, 2, 4, 2, 1, 2, 3, 1, 2, 2, 4, 2, 1, 2, 3, 1, 2, 2, 4, 1, 2, 2, 3, 2, 2, 2, 4, 1, 1, 2, 3, 2, 2, 2, 4, 2, 1, 2, 3, 1, 2, 2, 4, 1, 2, 2, 3, 2, 2
Offset: 1

Views

Author

Keywords

Comments

Pfister proved that a(p) <= 2 for all primes p; then a(p) is called the stufe of the field Z/pZ.
Conjecture: a(n) = 4 if and only if n is divisible by 8 and a(n) = 3 if and only if n is 4 mod 8. Together with A008784 this would completely define the sequence.

Examples

			a(3) = 2: 1^2 + 1^2 = -1 mod 3.
a(15) = 2: 2^2 + 5^2 = -1 mod 15.
		

References

  • Albert Pfister, Zur Darstellung von -1 Als Summe von Quadraten in einem Korper, J. London Math. Society, 40 (1965), pp. 159-165.
  • A. R. Rajwade, Squares, Cambridge Univ. Press, 1983.

Crossrefs

Programs

  • PARI
    isA008784(n)=if(n%2==0, if(n%4, n/=2, return(0))); n==1||vecmax(factor(n)[, 1]%4)==1
    a(n)=if(isA008784(n),return(n>1)); if(isprime(n), return(2)); if(n%8==0, return(4)); my(N, cur, new, k=1); for(i=1,n\2,cur=N=bitor(1<<(i^2%n),N)); while(!bittest(cur,n-1), new=0; for(i=1,n\2, t=cur<<(i^2%n); t=bitor(bitand(t,(1<>n); new=bitor(new,t)); k++; cur=new); k

Formula

a(n) <= A002828(n-1) <= 4.
a(n) = 1 if and only if n > 1 is in A008784. a(4n) >= 3 for all n.

A277889 After zero, excess of the odd terms in A276573 (the infinite trunk of least squares beanstalk) over the even terms.

Original entry on oeis.org

0, 1, 0, -1, 0, 1, 0, -1, 0, -1, 0, -1, -2, -1, -2, -3, -2, -1, -2, -1, 0, -1, 0, 1, 0, 1, 0, -1, 0, -1, -2, -1, 0, -1, -2, -1, -2, -1, -2, -1, -2, -3, -2, -1, -2, -1, -2, -3, -2, -3, -4, -3, -2, -3, -2, -1, -2, -1, -2, -3, -4, -3, -4, -3, -2, -3, -2, -1, -2, -1, -2, -1, -2, -3, -2, -1, -2, -1, -2, -1, 0, -1, 0, 1, 2, 1, 0
Offset: 0

Views

Author

Antti Karttunen, Nov 13 2016

Keywords

Comments

Is a(2358) = 0 the last zero of this sequence? See also comments in A277891.

Crossrefs

Formula

a(0) = 0; for n >= 1, a(n) = a(n-1) - (-1)^A276573(n).

A338480 Least number of heptagonal numbers needed to represent n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 7, 2, 3, 4, 5, 1, 2, 3, 3, 4, 5, 6, 2, 3, 4, 4, 5, 6, 7, 3, 4, 1, 2, 2, 3, 4, 4, 5, 2, 3, 3, 4, 5, 5, 6, 3, 4, 4, 5, 2, 3, 3, 1, 2, 3, 4, 3, 4, 4, 2, 3, 4, 5, 4, 5, 2, 3, 3, 4, 4, 2, 3, 3, 4, 4, 5, 5, 3, 1, 2, 3, 4, 5, 3, 4, 2, 2, 3, 3, 4, 4, 5, 3, 3, 4, 4, 2, 3, 4
Offset: 1

Views

Author

Ilya Gutkovskiy, Oct 29 2020

Keywords

Crossrefs

A338484 Least number of centered square numbers needed to represent n.

Original entry on oeis.org

1, 2, 3, 4, 1, 2, 3, 4, 5, 2, 3, 4, 1, 2, 3, 4, 5, 2, 3, 4, 5, 6, 3, 4, 1, 2, 3, 4, 5, 2, 3, 4, 5, 6, 3, 4, 5, 2, 3, 4, 1, 2, 3, 4, 5, 2, 3, 4, 5, 2, 3, 4, 5, 2, 3, 4, 5, 6, 3, 4, 1, 2, 3, 4, 5, 2, 3, 4, 5, 6, 3, 4, 5, 2, 3, 4, 5, 6, 3, 4, 5, 2, 3, 4, 1, 2, 3, 4, 5, 2, 3, 4, 5, 6, 3, 4, 5, 2, 3, 4, 5
Offset: 1

Views

Author

Ilya Gutkovskiy, Oct 30 2020

Keywords

Crossrefs

A338493 Least number of square pyramidal numbers needed to represent n.

Original entry on oeis.org

1, 2, 3, 4, 1, 2, 3, 4, 5, 2, 3, 4, 5, 1, 2, 3, 4, 5, 2, 3, 4, 5, 6, 3, 4, 5, 6, 2, 3, 1, 2, 3, 3, 4, 2, 3, 4, 4, 5, 3, 4, 3, 4, 2, 3, 4, 4, 5, 3, 4, 5, 5, 6, 4, 1, 2, 3, 3, 4, 2, 3, 4, 4, 5, 3, 4, 5, 5, 2, 3, 4, 4, 5, 3, 4, 5, 5, 6, 4, 5, 6, 6, 3, 4, 2, 3, 4, 4, 5, 3, 1, 2, 3, 4, 4, 2, 3, 4, 3, 4, 3
Offset: 1

Views

Author

Ilya Gutkovskiy, Oct 30 2020

Keywords

Crossrefs

Previous Showing 61-70 of 90 results. Next