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-4 of 4 results.

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.

A337598 a(n) is the greatest number m not yet in the sequence such that the factorial 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, 30, 26, 32, 54, 56, 25, 31, 27, 33, 55, 57, 50, 51, 38, 39, 62, 63, 78, 80, 79, 81, 86, 87, 48, 49, 36, 37, 60, 61, 28, 34, 29, 35, 58, 59, 52, 53, 40, 41, 64, 65, 84, 85
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 (A084558) and the sum of digits (A034968) in factorial base.

Examples

			For n = 42:
- the factorial base expansion of 42 is "1300",
- there are four numbers m with the same multiset of digits:
     m   fact(m)
     --  -------
     42  "1300"
     73  "3001"
     74  "3010"
     78  "3100"
- so a(42) = 78,
     a(73) = 74,
     a(74) = 73,
     a(78) = 42.
		

Crossrefs

See A333658 and A333659 for similar sequences.

Programs

  • PARI
    See Links section.

Formula

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

A338829 a(n) is the greatest number not yet in the sequence with the same number of digits and the same sum of digits as n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50, 60, 70, 80, 90, 91, 11, 21, 31, 41, 51, 61, 71, 81, 82, 92, 12, 22, 32, 42, 52, 62, 72, 73, 83, 93, 13, 23, 33, 43, 53, 63, 64, 74, 84, 94, 14, 24, 34, 44, 54, 55, 65, 75, 85, 95, 15, 25, 35, 45, 46, 56, 66, 76
Offset: 0

Views

Author

Rémy Sigrist, Nov 11 2020

Keywords

Comments

This sequence is a self-inverse permutation of the nonnegative integers.
We have a fixed point with m digits and sum of digits k whenever A289410(m, k) is odd.

Examples

			For n = 23:
- the numbers with 2 digits and sum of digits 5 are: 14, 23, 32, 41 and 50,
- so  a(14) = 50,
      a(23) = 41,
      a(32) = 32,
      a(41) = 23,
      a(50) = 14.
		

Crossrefs

Cf. A055642, A289410, A331274 (binary analog), A333659, A338834 (factorial base analog), A338835 (primorial base analog).

Programs

  • Mathematica
    Block[{a = {}, f, k}, f[x_] := Total@ IntegerDigits@ x; Do[k = f[i]; AppendTo[a, SelectFirst[Range[10^# - 1, 10^(# - 1), -1] &@ Floor[1 + Log10[i]], And[f[#] == k, FreeQ[a, #]] &]], {i, 67}]; a] (* Michael De Vlieger, Nov 13 2020 *)
  • PARI
    See Links section.

Formula

A055642(a(n)) = A055642(n).
A007953(a(n)) = A007953(n).

A352152 Reverse each run of consecutive nonzero digits in the decimal expansion of n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 21, 31, 41, 51, 61, 71, 81, 91, 20, 12, 22, 32, 42, 52, 62, 72, 82, 92, 30, 13, 23, 33, 43, 53, 63, 73, 83, 93, 40, 14, 24, 34, 44, 54, 64, 74, 84, 94, 50, 15, 25, 35, 45, 55, 65, 75, 85, 95, 60, 16, 26, 36, 46, 56, 66, 76
Offset: 0

Views

Author

Rémy Sigrist, Mar 06 2022

Keywords

Comments

This sequence is a self-inverse permutation of the nonnegative integers.
This sequence first differs from A321474 for n = 102: a(102) = 102 whereas A321474(102) = 201.
This sequence first differs from A333659 for n = 101: a(101) = 101 whereas A333659(101) = 110.
This sequence first differs from A336956 for n = 102: a(102) = 102 whereas A336956(102) = 201.

Examples

			For n = 1024:
- we have two runs of consecutive nonzero digits: "1" and "24",
- the reverse of "1" is "1", that of "24" is "42",
- so a(1024) = 1042.
		

Crossrefs

Programs

  • Perl
    sub a { my $v = shift; $v =~ s/[1-9]+/reverse($&)/ge; return $v; }
    
  • Python
    from itertools import groupby
    def A352152(n): return int(''.join(''.join(list(g) if k else list(g)[::-1]) for k, g in groupby(str(n),key=lambda x:x =='0'))) # Chai Wah Wu, Mar 08 2022

Formula

a(10*n) = 10*a(n).
Showing 1-4 of 4 results.