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.

A352510 Starts of runs of 3 consecutive Catalan-Niven numbers (A352508).

Original entry on oeis.org

4, 55, 144, 145, 511, 2943, 6950, 7734, 9470, 9750, 15630, 15631, 35034, 35464, 41590, 41986, 64735, 68523, 68870, 77510, 81150, 90958, 106063, 118264, 119043, 135970, 139403, 163188, 164862, 164863, 171346, 181510, 200759, 202761, 202762, 208024, 209230, 209586
Offset: 1

Views

Author

Amiram Eldar, Mar 19 2022

Keywords

Examples

			4 is a term since 4, 5 and 6 are all Catalan-Niven numbers: the Catalan representation of 4, A014418(20) = 20, has the sum of digits 2+0 = 2 and 4 is divisible by 2, the Catalan representation of 5, A014418(5) = 100, has the sum of digits 1+0+0 = 1 and 5 is divisible by 1, and the Catalan representation of 6, A014418(6) = 101, has the sum of digits 1+0+1 = 2 and 6 is divisible by 2.
		

Crossrefs

Programs

  • Mathematica
    c[n_] := c[n] = CatalanNumber[n]; catNivQ[n_] := Module[{s = {}, m = n, i}, While[m > 0, i = 1; While[c[i] <= m, i++]; i--; m -= c[i]; AppendTo[s, i]]; Divisible[n, Plus @@ IntegerDigits[Total[4^(s - 1)], 4]]]; seq[count_, nConsec_] := Module[{cn = catNivQ /@ Range[nConsec], s = {}, c = 0, k = nConsec + 1}, While[c < count, If[And @@ cn, c++; AppendTo[s, k - nConsec]]; cn = Join[Rest[cn], {catNivQ[k]}]; k++]; s]; seq[30, 3]