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: Melvin Peralta

Melvin Peralta's wiki page.

Melvin Peralta has authored 8 sequences.

A295319 a(n) is the sum of all n-digit palindromes.

Original entry on oeis.org

45, 495, 49500, 495000, 49500000, 495000000, 49500000000, 495000000000, 49500000000000, 495000000000000, 49500000000000000, 495000000000000000, 49500000000000000000, 495000000000000000000, 49500000000000000000000, 495000000000000000000000
Offset: 1

Author

Melvin Peralta, Nov 19 2017

Keywords

Comments

For n > 1, the sum of the digits of a(n) is always 18 (see AoPS link).
Conjecture: All terms after a(1) are of the form 495*10^x where x is any nonnegative integer k such that k != 1 (mod 3). - Harvey P. Dale, Mar 05 2023

Examples

			The sum of all nine two-digit palindromes is 11 + 22 + 33 + 44 + 55 + 66 + 77 + 88 + 99 = 495, and so a(2) = 495.
The sum of all three-digit palindromes is (101 + 999) + (111 + 989) + (121 + 979) + ... (545 + 565) + 555 = 49500, and so a(3) = 49500.
		

Crossrefs

Programs

  • Mathematica
    palSum[n_] := 99/2*10^(n - 1) * 10^Floor[(n - 1)/2]; palSum[1] = 45; Array[ palSum, 16] (* Robert G. Wilson v, Nov 21 2017 *)
  • PARI
    a(n) = if (n==1, 45, 9*10^floor((n-1)/2)*11*10^(n-1)/2); \\ Michel Marcus, Dec 26 2017

Formula

a(n) = A050683(n)*(5*10^(n-1) + (9/2)*10^(n-2) + ... + (9/2)*10 + 5) (calculates the sum by multiplying the expected value of a randomly selected n-digit palindrome with the number of n-digit palindromes).
For n > 1, a(n) = (A050683(n)/2)*11*10^(n-1).
For n > 3, a(n) = 1000 * a(n - 2). - David A. Corneth, Dec 26 2017
G.f.: x*(45 + 495*x + 4500*x^2)/(1 - 1000*x^2). - Chai Wah Wu, Jan 22 2018
E.g.f.: 9*(11*cosh(10*sqrt(10)*x) + 11*sqrt(10)*sinh(10*sqrt(10)*x) - 11 - 100*x)/200. - Stefano Spezia, Sep 19 2024

A286899 Array read by antidiagonals: A(n, L) is the number of closed walks of length 2L along the edges of an n-cube based at a vertex, for n >= 1 and L >= 1.

Original entry on oeis.org

1, 1, 2, 1, 8, 3, 1, 32, 21, 4, 1, 128, 183, 40, 5, 1, 512, 1641, 544, 65, 6, 1, 2048, 14763, 8320, 1205, 96, 7, 1, 8192, 132861, 131584, 26465, 2256, 133, 8, 1, 32768, 1195743, 2099200, 628805, 64896, 3787, 176, 9, 1, 131072, 10761681, 33562624, 15424865
Offset: 1

Author

Melvin Peralta, May 15 2017

Keywords

Examples

			A(2, 2) = 8 because at each vertex of a 2-cube (i.e., a square), there are 8 closed walks of length 2(2) = 4.
A(1, k) = 1 because at the vertex of a 1-cube, there is 1 closed walk of any length 2*k.
Array A(n, L) begins:
   1         1         1         1         1         1 ...
   2         8        32       128       512      2048 ...
   3        21       183      1641     14763    132861 ...
   4        40       544      8320    131584   2099200 ...
   5        65      1205     26465    628805  15424865 ...
   6        96      2256     64896   2086656  71172096 ...
   7       133      3787    134953   5501167 243147373 ...
		

References

  • R. P. Stanley, Algebraic Combinatorics: Walks, Trees, Tableaux, and More, Springer, 2013.

Crossrefs

Programs

  • Maple
    A286899 := proc(n,L)
        add(binomial(n,i)*(n-2*i)^L, i=0..n) ;
        %/2^n ;
    end proc:
    for n from 1 to 7 do
        for L from 2 to 12 by 2 do
            printf("%9d ",A286899(n,L)) ;
        end do:
        printf("\n") ;
    end do: # R. J. Mathar, May 22 2017
  • Mathematica
    f[n_, l_] := 1/2^n*Sum[Binomial[n, i]*(n - 2 i)^l, {i, 0, n}];
    Table[f[n - l + 1, 2 l], {n, 1, 15}, {l, n, 1, -1}] // Flatten

Formula

A(n, L) = (1/2^n)*Sum_{i=0..n} binomial(n, i)*(n - 2*i)^(2*L). (Corrected by Peter Luschny, Jul 07 2019.)

A285079 Oblong numbers the product of whose digits are positive oblong numbers.

Original entry on oeis.org

2, 6, 12, 56, 132, 156, 756, 2756, 4556, 6162, 6972, 7656, 13572, 21756, 31152, 33672, 45156, 61752, 84972, 153272, 166872, 279312, 467172, 626472, 661782, 1273512, 1412532, 1541322, 1568756, 1596432, 1786232, 1867322, 2678132, 2817362, 3416952, 3521252
Offset: 1

Author

Melvin Peralta, Apr 09 2017

Keywords

Comments

Oblong numbers are numbers of the form k*(k+1) (A002378).

Crossrefs

Programs

  • Maple
    filter:= proc(x) local t; t:= convert(convert(x,base,10),`*`);
    t > 0 and issqr(1+4*t); end proc:
    select(filter, [seq(x*(1+x),x=1..10^4)]); # Robert Israel, Apr 14 2017
  • Mathematica
    f[x_] := Sqrt[1 + 4 (Times @@ IntegerDigits[x])]; Select[Table[n (n + 1), {n, 1, 10000}], f[#] > 1 && Mod[f[#], 2] == 1 &]

A272934 Depth of Pascal's triangle such that the number of elements in the triangle is a factor of the sum of the elements.

Original entry on oeis.org

1, 2, 6, 18, 42, 126, 162, 378, 486, 882, 1458, 2646, 3078, 3942, 5418, 9198, 11826, 14406, 16758, 18522, 24966, 26406, 37338, 39366, 42462, 71442, 77658, 95922, 99078, 113778, 117306, 143262, 174762, 175446, 184842, 265482, 304038, 308826, 318402, 351918
Offset: 1

Author

Melvin Peralta, May 11 2016

Keywords

Comments

a(n) are the values m such that the expression (2^(m+1) - 2)/(m^2 + m) is an integer.
a(n) are the values m such that A000225(m)/A000217(m) is an integer.
It appears that a(n) == 2 (mod 4) for n > 1. - Robert Israel, Jul 04 2017

Examples

			a(2) = 6 because if Pascal's triangle is written out to 6 rows, there will be 21 elements whose sum is 63, and 21 is a factor of 63.
6 is a term because A000225(6)/A000217(6) = 63/21 = 3, an integer.
		

Crossrefs

Programs

  • Maple
    select(t -> 2 &^ t  - 1 mod t*(t+1)/2 = 0, [$1..10^6]); # Robert Israel, Jul 04 2017
  • Mathematica
    Join[{1}, Select[Range[10^6], PowerMod[2, #+1, #^2+#] == 2 &]]

Extensions

Mild editing. Wolfdieter Lang, May 31 2016

A268283 Number of distinct directed Hamiltonian cycles of the Platonic graphs (in the order of tetrahedral, cubical, octahedral, dodecahedral, and icosahedral graph).

Original entry on oeis.org

6, 12, 32, 60, 2560
Offset: 1

Author

Melvin Peralta, Jan 29 2016

Keywords

Comments

a(n)/2 is the number of distinct undirected Hamiltonian cycles of the Platonic graph corresponding to a(n).

Crossrefs

Cf. A052762 (tetrahedral graph), A140986 (cubical graph), A115400 (octahedral graph), A218513 (dodecahedral graph), A218514 (icosahedral graph).

A268135 Numbers n such that the digit sum of n^2 is a divisor of the digit sum of n.

Original entry on oeis.org

1, 9, 10, 18, 19, 45, 46, 55, 90, 99, 100, 145, 149, 180, 189, 190, 198, 199, 289, 351, 361, 369, 379, 388, 450, 451, 459, 460, 468, 495, 496, 549, 550, 558, 559, 568, 585, 595, 639, 729, 739, 775, 838, 855, 900, 954, 955, 990, 999, 1000, 1049, 1098, 1099, 1179, 1188, 1189, 1198
Offset: 1

Author

Melvin Peralta, Jan 26 2016

Keywords

Comments

Because A058369 (with offset 1) is a subsequence, this sequence is infinite.
Conjecture: The relative complement of A058369 with respect to this sequence is infinite. That is, there are infinitely many n such that the digit sum of n^2 is a proper divisor of the digit sum of n.
If the digit sum of n^2 is a proper divisor of the digit sum of n, then this property holds for 10*n as well, i.e. the digit sum of n = 149*10^k has as a proper divisor the digit sum of n^2 for all k > 0. Are there infinitely many n that are not a multiple of 10 such that the digit sum of n^2 is a proper divisor of the digit sum of n? The first few such numbers are: 149, 549, 1049, 14499, 19499, 55679, 59499, 64499, 73499, 118499, 144999, 145949, 179249, 244949, 244998, 334679, 347855, 473499, 548735, 549549, 549639, 556965, 837855, ... - Chai Wah Wu, Mar 16 2016

Examples

			Digit sum of 149^2 = 7. Digit sum of 149 = 14. Since 7 is a divisor of 14, 149 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[200], Mod[Total[IntegerDigits[#]], Total[IntegerDigits[#^2]]] == 0 &]
  • PARI
    isok(n) = (sumdigits(n) % sumdigits(n^2)) == 0; \\ Michel Marcus, Jan 27 2016

Extensions

More terms from Michel Marcus, Jan 27 2016

A265853 a(0)=1; for n >= 1, a(n) is the number of subsets of [a(0), a(1), ..., a(n-1)] whose sum is equal to a(n-1).

Original entry on oeis.org

1, 1, 2, 2, 3, 5, 6, 8, 11, 17, 25, 33, 41, 52, 80, 139, 204, 245, 289, 410, 692, 1159, 1477, 2010, 2769, 4247, 6128, 7709, 9817, 14071, 21982, 34892, 52079, 63998, 81167, 122709, 183662, 267520, 382690, 521361, 725601, 1050579, 1541163, 2084690, 2829408
Offset: 0

Author

Melvin Peralta, Dec 21 2015

Keywords

Examples

			a(4) = 3 because there are subsets of [1, 1, 2, 2] that sum to a(3) = 2: {1, 1}, {2}, {2}.
		

Crossrefs

Cf. A057601.

Programs

  • Maple
    s:= proc(n) option remember; `if`(n<0, 0, s(n-1)+a(n)) end:
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(s(i) `if`(p>=0, b(p, i-1), 0))(n-a(i))))
        end:
    a:= n-> `if`(n=0, 1, b(a(n-1), n-1)):
    seq(a(n), n=0..44);  # Alois P. Heinz, Jan 24 2024
  • Mathematica
    lst={1};n=1;While[n<30, lst = Join[lst, {Length@Select[Total /@ Subsets[lst],#==Last[lst]&]}];n++]

Formula

a(0) = 1; a(n) = [x^a(n-1)] Product_{k=0..n-1} (1 + x^a(k)). - Ilya Gutkovskiy, Jan 24 2024

Extensions

More terms from Bert Dobbelaere, Oct 28 2018

A268962 a(1) = 1 and a(2) = 2; thereafter a(n+1) = floor[sqrt(a(n))] if not already in the sequence; otherwise a(n+1) = a(n) + a(n-1).

Original entry on oeis.org

1, 2, 3, 5, 8, 13, 21, 4, 25, 29, 54, 7, 61, 68, 129, 11, 140, 151, 12, 163, 175, 338, 18, 356, 374, 19, 393, 412, 20, 432, 452, 884, 1336, 36, 6, 42, 48, 90, 9, 99, 108, 10, 118, 128, 246, 15, 261, 16, 277, 293, 17, 310, 327, 637, 964, 31, 995, 1026, 32
Offset: 1

Author

Melvin Peralta, Feb 16 2016

Keywords

Comments

Hans Havermann found that the sequence is not a permutation of the integers since a(708)=a(1276)=1666.

Crossrefs

Programs