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.

Showing 1-1 of 1 results.

A363244 Numbers that in primorial-base representation have digits with an alternating parity.

Original entry on oeis.org

0, 1, 2, 5, 7, 11, 14, 19, 23, 26, 32, 44, 56, 67, 71, 79, 83, 92, 104, 116, 127, 131, 139, 143, 152, 164, 176, 187, 191, 199, 203, 217, 221, 229, 233, 277, 281, 289, 293, 337, 341, 349, 353, 397, 401, 409, 413, 452, 464, 476, 512, 524, 536, 572, 584, 596, 637
Offset: 1

Views

Author

Amiram Eldar, May 23 2023

Keywords

Comments

The sum of the first k odd-indexed primorial numbers (A002110) is a term, since its primorial-base representation is 1010...10, with the block "10" repeated k times (these numbers are 2, 32, 2342, 512852, 223605722, ...).

Examples

			7 is a term since its primorial-base representation is 101 and the parities of its digits are odd, even, odd.
		

Crossrefs

Similar sequences: A000975 (binary), A030141 (decimal), A033068 (ternary), A179970 (quaternary), A351897 (factorial base).

Programs

  • Mathematica
    With[{max = 5}, bases = Prime@ Range[max, 1, -1]; nmax = Times @@ bases - 1; q[n_] := AllTrue[Differences@ Mod[IntegerDigits[n, MixedRadix[bases]], 2], # != 0 &]; Select[Range[0, nmax], q]]
  • PARI
    is(n) = {my(p = 3, r1 = n%2); n \= 2; while(n > 0, r2 = (n%p)%2; n \= p; p = nextprime(p+1); if(r1 == r2, return(0)); r1 = r2); 1; }
Showing 1-1 of 1 results.