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.

User: Arlu Genesis A. Padilla

Arlu Genesis A. Padilla's wiki page.

Arlu Genesis A. Padilla has authored 5 sequences.

A316359 a(n) is the number of solutions to the Diophantine equation i^3 + j^3 + k^3 = n^3, where 0 < i <= j <= k.

Original entry on oeis.org

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

Author

Keywords

Comments

The first number to have a nonzero number of solutions is 6, which is 3^3 + 4^3 + 5^3 = 6^3. Its cube 216 has been called Plato's number in reference to this.
First occurrence of k=0,1,2...: 0, 6, 18, 54, 87, 108, 216, 174, 348, 396, 324, 696, 864, 492, etc. - Robert G. Wilson v, Jul 02 2018

Examples

			a(18)=2, because 18^3 = 9^3 + 12^3 + 15^3 = 2^3 + 12^3 + 16^3.
		

Crossrefs

Cf. A046080.

Programs

  • Mathematica
    Array[Count[PowersRepresentations[#^3, 3, 3], ?(FreeQ[Differences@ #, 0] &)] &, 105] (* _Michael De Vlieger, Jun 30 2018 *)
  • PARI
    a(n) = sum(i=1, n, sum(j=1, i, sum(k=1, j, i^3 + j^3 + k^3 == n^3))); \\ Michel Marcus, Jul 02 2018
    
  • PARI
    a(n)={sum(i=1, n, sum(j=1, i, my(k); ispower(n^3-j^3-i^3, 3, &k) && k>=1 && k<=j ))} \\ Andrew Howroyd, Jul 07 2018
    
  • Python
    from sympy.solvers.diophantine.diophantine import power_representation
    def A316359(n): return len(list(power_representation(n**3,3,3))) # Chai Wah Wu, Nov 19 2024

A253251 a(1) = 1, and for n > 0, a(n+1) = a(n) + floor(10^k/a(n)), where k is the least integer such that 10^k >= a(n).

Original entry on oeis.org

1, 2, 7, 8, 9, 10, 11, 20, 25, 29, 32, 35, 37, 39, 41, 43, 45, 47, 49, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101
Offset: 1

Author

Keywords

Comments

a(1) = 1 is the first number in the sequence because it is the first positive integer that has a reciprocal, whereas zero has no definite result (infinity) for its reciprocal.
If any other positive integer is used as a(1) (for example, a(1) = 5), the resulting terms will follow the original sequence after a few cycles of adding and flooring.
Example:
b(1) = 5,
b(2) = 5+floor(10/5) = 7,
b(3) = 7+floor(10/7) = 8, which is a(4) in the original sequence.
Also, if any negative integer is used as a(1) (and the condition is adjusted to -1 <= ceiling(10^k/a(n-1)) < -10), the same happens, except that the resulting terms will be negative.
Example:
c(1) = -1,
c(2) = -1+ceiling(1/-1) = -2,
c(3) = -2+ceiling(10/-2) = -7, which is the negative of a(3) in the original sequence.
Also,
d(1) = -5,
d(2) = -5+ceiling(10/-5) = -7,
d(3) = -7+ceiling(10/-7) = -8, which is the negative of a(4) in the original sequence.

Examples

			a(1) = 1;
a(2) = 1 + floor(10^0/a(1)) = 2 with a(1) = 10^0;
a(3) = 2 + floor(10/a(2)) = 7 with 1 < a(2) < 10;
...
a(7) = 10 + floor(10/a(6)) = 11 with a(6) = 10;
a(8) = 11 + floor(10^2/a(7)) = 20 with 10 < a(7) < 10^2.
		

Programs

  • C
    // Input: a(n), Output: a(n+1)
    int A253251 (int a) {
       int t=1, r=0;
       while (t/a==0) {
          t*=10;
       }
       r=t/a;
       return r+a;
    }
    
  • Mathematica
    f[n_] := Block[{a = {1}, i, k}, For[i = 2, i <= n, i++, k = 0; While[10^k < a[[i - 1]], k++]; AppendTo[a, a[[i - 1]] + Floor[10^k/a[[i - 1]]]]]; a]; f@ 70 (* Michael De Vlieger, Jun 19 2015 *)
  • PARI
    first(n)=my(v=vector(n,i,1),N=1,k=1);for(i=2,n,if(k>N,N*=10);v[i]=k+=N\k);v \\ Charles R Greathouse IV, Jun 18 2015

Formula

a(n) + 1 <= a(n+1) <= a(n) + 9, hence n <= a(n) <= 9n. - Charles R Greathouse IV, Jun 18 2015

A249919 Number of LCD (liquid-crystal display) segments needed to display n in binary.

Original entry on oeis.org

6, 2, 8, 4, 14, 10, 10, 6, 20, 16, 16, 12, 16, 12, 12, 8, 26, 22, 22, 18, 22, 18, 18, 14, 22, 18, 18, 14, 18, 14, 14, 10, 32, 28, 28, 24, 28, 24, 24, 20, 28, 24, 24, 20, 24, 20, 20, 16, 28, 24, 24, 20, 24, 20, 20, 16, 24, 20, 20, 16, 20, 16, 16, 12, 38, 34, 34, 30, 34, 30, 30, 26, 34, 30, 30, 26, 30, 26, 26
Offset: 0

Author

Keywords

Comments

The "LCD" refers to how 0 and 1 are displayed, such that zero is represented with 6 lines, and one is represented with 2 lines:
_
| | |
|_| and |

Examples

			For n = 4, 4 = 100_2. So, a(4) = 2 + 6 + 6 = 14. - _Indranil Ghosh_, Feb 02 2017
		

Crossrefs

Programs

  • C
    // Input: n (no negative offset/term number), Output: a(n)
    int A249919 (int n) {
       int m=0, r=0;
       if (n) {
          while (n!=1) {
             m=n&1; //equivalent to m=n%2;
             n=n>>1; //equivalent to n/=2;
             if (m) {
                r+=2;
             } else {
                r+=6;
             }
          }
          r+=2;
       } else {
          r+=6;
       }
       return r;
    }
    // Arlu Genesis A. Padilla, Jun 18 2015
    
  • Mathematica
    f[n_] := Total[{2, 6}*(Count[ IntegerDigits[n, 2], #] & /@ {1, 0})]; Array[f, 79, 0] (* Robert G. Wilson v, Jul 26 2015 *)
  • PARI
    a(n)=if(n==0, 6, 6*#binary(n) - 4*hammingweight(n)); \\ Charles R Greathouse IV, Feb 28 2015
    
  • Python
    def A249919(n):
        x=bin(n)[2:]
        s=0
        for i in x:
            s+=[6,2][int(i)]
        return s # Indranil Ghosh, Feb 02 2017

Formula

The formulas below do not include a(0)=6:
a(2^(n-1)) = 2 + 6(n-1).
a((2^n)-1) = 2n.
a(x) = a(2^(n+1) + (2^n)-1) = a(2^(n+2)-1) + 4.
a(y) = a(2^(n+1) + (2^n)) = a(2^(n+1)) - 4.
a(x - u) + 6 = a(x - u + 2^(n+1)).
a(y + u) + 6 = a(y + u + 2^(n+1)).
a(2^(n+1)) + a(2^(n+2)-1) = a(x - u) + a(y + u).
where n=1, 2, ...
and u=0, ..., (2^n)-2.
a(n) = A010371(A007088(n)). - Michel Marcus, Aug 01 2015

A243369 Denominators of Egyptian fraction expansion of e, without repetition.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 2355, 17497263, 1860801514823609, 3584505381349378370871887741627, 85751894581999497691951513557530024967086681471033652102477414
Offset: 1

Author

Keywords

Comments

Slightly different version of A073422, disregarding the repetition of values.
Similar process to A243020 (Denominators of Egyptian fraction expansion of Pi, without repetition).
The integer terms a(1), a(2), ... approximate Euler's constant A001113 = 1/a(1) + 1/a(2) + 1/a(3)+... by a(1)=1 and then selecting a(n) as the smallest positive number not yet in {a(1),...,a(n-1)} such that the remainder A001113 -1/a(1) -1/a(2) ... -1/a(n) remains positive. - R. J. Mathar, Jul 03 2017

Examples

			e = 1 + 1/2 + 1/3 + ... + 1/8 + 1/2355 + ...
		

Crossrefs

Cf. A073422.

Programs

  • Maple
    Digits := 1000:
    a243369set := {1} ;
    for loop from 1 to 13 do
        erest := evalf(exp(1))-add(1/p,p=a243369set) ;
        eivn := ceil(1/erest) ;
        while eivn in a243369set do
            eivn := eivn+1 ;
        end do:
        a243369set := a243369set union {eivn} ;
        print(eivn) ;
    end do: # R. J. Mathar, Jul 03 2017

A243020 Denominators of Egyptian fraction expansion of Pi, without repetition.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 27, 744, 1173268, 2586625801171, 14348276635209672362238685, 1062286904072440687703470835520966381484062674280821
Offset: 1

Author

Keywords

Comments

Slightly different version of A182257, disregarding the repetition of values.

Examples

			Pi = 1 + 1/2 + 1/3 + ... + 1/12 + 1/27 + 1/744 + ...
		

Crossrefs

Extensions

a(16)-a(18) from Arlu Genesis A. Padilla, Jul 30 2018