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.

A333658 a(n) is the greatest number m not yet in the sequence such that the primorial base expansions of n and of m have the same digits (up to order but with multiplicity).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 8, 7, 9, 14, 15, 12, 13, 10, 11, 16, 17, 18, 20, 19, 21, 22, 23, 24, 26, 25, 27, 28, 29, 30, 36, 32, 38, 66, 68, 31, 37, 33, 39, 67, 69, 62, 63, 44, 45, 74, 75, 96, 98, 97, 99, 104, 105, 126, 128, 127, 129, 134, 135, 60, 61, 42, 43, 72, 73
Offset: 0

Views

Author

Rémy Sigrist, Sep 02 2020

Keywords

Comments

Leading 0's are ignored.
This sequence is a permutation of the nonnegative integers, which preserves the number of digits (A235224) and the sum of digits (A276150) in primorial base.

Examples

			For n = 42:
- the primorial base representation of 42 is "1200",
- there are five numbers m with the same multiset of digits:
    m   prim(m)
    --  -------
    34  "1020"
    42  "1200"
    61  "2001"
    62  "2010"
    66  "2100"
- so a(34) = 66,
     a(42) = 62,
     a(61) = 61,
     a(62) = 42,
     a(66) = 34.
		

Crossrefs

See A333659 and A337598 for similar sequences.

Programs

  • PARI
    See Links section.

Formula

a(A002110(n)) = A002110(n) for any n >= 0.