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

A350674 Irregular table read by rows; the n-th row contains, in weakly decreasing order, the positive squares summing to n as obtained by the greedy algorithm.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 4, 4, 1, 4, 1, 1, 4, 1, 1, 1, 4, 4, 9, 9, 1, 9, 1, 1, 9, 1, 1, 1, 9, 4, 9, 4, 1, 9, 4, 1, 1, 16, 16, 1, 16, 1, 1, 16, 1, 1, 1, 16, 4, 16, 4, 1, 16, 4, 1, 1, 16, 4, 1, 1, 1, 16, 4, 4, 25, 25, 1, 25, 1, 1, 25, 1, 1, 1, 25, 4, 25, 4, 1, 25, 4, 1, 1
Offset: 1

Views

Author

Rémy Sigrist, Jan 10 2022

Keywords

Comments

The n-th row has A053610(n) terms.

Examples

			The first rows are:
     1:    [1]
     2:    [1, 1]
     3:    [1, 1, 1]
     4:    [4]
     5:    [4, 1]
     6:    [4, 1, 1]
     7:    [4, 1, 1, 1]
     8:    [4, 4]
     9:    [9]
    10:    [9, 1]
    11:    [9, 1, 1]
    12:    [9, 1, 1, 1]
    13:    [9, 4]
    14:    [9, 4, 1]
    15:    [9, 4, 1, 1]
    16:    [16]
		

Crossrefs

Programs

  • PARI
    row(n,e=2) = { my (g=[], r); while (n, r=sqrtnint(n,e); n-=r^e; g=concat(g,[r^e])); g }

Formula

T(n, 1) = A048760(n).
T(n, A053610(n)) = A350698(n).

A055655 Efficient representation of n in "square base" where xyz means 9x+4y+z and z<4, y<9 and x<16 etc.

Original entry on oeis.org

0, 1, 2, 3, 10, 11, 12, 13, 20, 21, 22, 23, 30, 31, 32, 33, 40, 41, 42, 43, 50, 51, 52, 53, 60, 61, 62, 63, 70, 71, 72, 73, 80, 81, 82, 83, 163, 170, 171, 172, 173, 180, 181, 182, 183, 263, 270, 271, 272, 273, 280, 281, 282, 283, 363, 370, 371, 372, 373, 380, 381
Offset: 0

Views

Author

Henry Bottomley, Jun 07 2000

Keywords

Comments

Efficient means the smallest possible a(n), cf. example. From n = 9*9+8*4+3 = 116 on, the terms (coded in base 10) become ambiguous because digits may be larger than 9, e.g., 1000 could mean 1*16 or 10*9. One possible convention to avoid ambiguity would be to reserve as many digits as might be required for the largest possible coefficient: 2 digits for the coefficients of 9 (which may reach 16-1 = 15) through 81; 3 digits for the coefficients of 100 through 30^2, 4 digits for the coefficients of 31^2 (which may reach 32^2-1 = 1023) etc. - M. F. Hasler, Jul 25 2015

Examples

			a(50)=280 since 2*9+8*4+0*1=50; writing 20000 for 2*25 or 3xyz (for 3*16+x*9+y*4+z) or 5yz or 4yz or 3yz would be less efficient (larger "result" when read in base 10), and it is not possible to write 50 as 1*9+y*4+z*1 with y<9 and z<4.
		

References

  • F. Smarandache, Definitions solved and unsolved problems, conjectures and theorems in number theory and geometry, edited by M. Perez, Xiquan Publishing House, 2000.

Crossrefs

Cf. A007961 for greedy representation of n in "square base".

Programs

  • PARI
    a(n,s=0)={v=[3];until(v[#v]>=n,v=concat(v,v[#v]+((2+#v)^2-1)*(1+#v)^2)); for(i=1,#v-1,s=s*10+t=max(ceil((n-v[#v-i])/(#v-i+1)^2),0);n-=t*(#v-i+1)^2);s*10+n} \\ M. F. Hasler, Jul 25 2015

Extensions

Corrected and edited by M. F. Hasler, Jul 25 2015
Previous Showing 11-12 of 12 results.