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.

Previous Showing 31-34 of 34 results.

A275846 Permutation of natural numbers: a(0) = 0, a(A255411(n)) = A153880(n), a(A256450(n)) = A273670(a(n)).

Original entry on oeis.org

0, 1, 3, 5, 2, 9, 4, 15, 7, 21, 11, 29, 6, 17, 41, 10, 8, 23, 12, 57, 16, 13, 14, 33, 18, 77, 22, 19, 20, 45, 25, 101, 31, 27, 28, 63, 35, 129, 43, 39, 40, 87, 47, 165, 59, 53, 55, 111, 24, 65, 213, 81, 26, 71, 75, 141, 34, 89, 269, 105, 30, 37, 95, 99, 32, 183, 36, 46, 113, 341, 38, 135, 48, 42, 51, 119, 50, 125, 44, 231, 49, 64, 143, 431, 54, 52
Offset: 0

Views

Author

Antti Karttunen, Aug 13 2016

Keywords

Crossrefs

Inverse: A275845.
Similar permutations: A273668 (a more recursed variant), A275847, A275848.

Formula

a(0) = 0; for n >= 1: if A257680(n) = 0 [when n is one of the terms of A255411] then a(n) = A153880(A257684(n)), otherwise [when n is one of the terms of A256450], a(n) = A273670(a(A273662(n))).

A276009 Decrement each nonzero digit by one in factorial base representation of n: a(n) = n - A276008(n).

Original entry on oeis.org

0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 2, 2, 6, 6, 6, 6, 8, 8, 12, 12, 12, 12, 14, 14, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 2, 2, 6, 6, 6, 6, 8, 8, 12, 12, 12, 12, 14, 14, 24, 24, 24, 24, 26, 26, 24, 24, 24, 24, 26, 26, 30, 30, 30, 30, 32, 32, 36, 36, 36, 36, 38, 38, 48, 48, 48, 48, 50, 50, 48, 48, 48, 48, 50, 50, 54, 54, 54, 54, 56, 56, 60, 60, 60, 60, 62, 62, 72, 72, 72, 72
Offset: 0

Views

Author

Antti Karttunen, Aug 18 2016

Keywords

Examples

			For n=23 whose factorial base representation is "321", when we subtract one from each digit we get "210", the factorial base representation of 14, thus a(23) = 14.
For n=37 ("1201"), when we subtract one from each digit we get "0100", thus a(37) = 6 as A007623(6) = 100.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{k = n, m = 2, r, s = {}}, While[{k, r} = QuotientRemainder[k, m]; k != 0|| r != 0, AppendTo[s, r]; m++]; s = Max[# - 1, 0]& /@ s; Total[s*Range[Length[s]]!]]; Array[a, 100, 0] (* Amiram Eldar, Feb 14 2024 *)
  • Python
    from sympy import factorial as f
    def a007623(n, p=2): return n if n

    0 else '0' for i in x)[::-1] return sum([int(y[i])*f(i + 1) for i in range(len(y))]) print([a(n) for n in range(201)]) # Indranil Ghosh, Jun 21 2017

  • Scheme
    (define (A276009 n) (- n (A276008 n)))
    ;; Standalone version:
    (define (A276009 n) (let loop ((n n) (s 0) (f 1) (i 2)) (if (zero? n) s (let ((d (modulo n i))) (if (zero? d) (loop (/ n i) s (* i f) (+ 1 i)) (loop (/ (- n d) i) (+ s (* f (- d 1))) (* i f) (+ 1 i)))))))
    

Formula

a(n) = n - A276008(n).

A266123 Decrement by 1 all digits > 1 in factorial base representation of n and then shift it one digit right.

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 3, 3, 2, 2, 3, 3, 3, 3, 4, 4, 5, 5, 5, 5, 6, 6, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9, 8, 8, 9, 9, 9, 9, 10, 10, 11, 11, 11, 11, 6, 6, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9, 8, 8, 9, 9, 9, 9, 10, 10, 11, 11, 11, 11, 12, 12, 13, 13, 13, 13, 14, 14, 15, 15, 15, 15, 14, 14, 15, 15, 15, 15, 16, 16, 17, 17, 17, 17, 18
Offset: 0

Views

Author

Antti Karttunen, Dec 23 2015

Keywords

Examples

			   n     A007623(n)  [subtract 1 from digits > 1     a(n)
       [in factorial  then shift one digit right]  [reinterpret
             base]                                  in decimal]
    0         0    ->      0                         =  0
    1         1    ->      0                         =  0
    2        10    ->      1                         =  1
    3        11    ->      1                         =  1
    4        20    ->      1                         =  1
    5        21    ->      1                         =  1
    6       100    ->     10                         =  2
    7       101    ->     10                         =  2
    8       110    ->     11                         =  3
    9       111    ->     11                         =  3
   10       120    ->     11                         =  3
   11       121    ->     11                         =  3
   12       200    ->     10                         =  2
   13       201    ->     10                         =  2
   14       210    ->     11                         =  3
   15       211    ->     11                         =  3
   16       220    ->     11                         =  3
   17       221    ->     11                         =  3
   18       300    ->     20                         =  4
		

Crossrefs

A276958 Permutation of natural numbers: a(A255411(n)) = A153880(n), a(A256450(n)) = A273670(n).

Original entry on oeis.org

1, 3, 4, 2, 5, 7, 9, 10, 11, 13, 15, 6, 16, 17, 18, 8, 19, 12, 20, 21, 22, 14, 23, 25, 27, 28, 29, 31, 33, 34, 35, 37, 39, 40, 41, 42, 43, 44, 45, 46, 47, 49, 51, 52, 53, 55, 57, 24, 58, 59, 61, 26, 63, 64, 65, 66, 67, 68, 69, 30, 70, 71, 73, 32, 75, 36, 76, 77, 79, 38, 81, 48, 82, 83, 85, 50, 87, 88, 89, 90, 91, 92, 93, 54
Offset: 1

Views

Author

Antti Karttunen, Sep 22 2016

Keywords

Crossrefs

Inverse: A276957.
For more recursed variants see: A275846, A275848 & A273668.

Programs

Formula

If A257680(n) = 0, then a(n) = A153880(A257684(n)), otherwise a(n) = A273670(A273662(n)).
Previous Showing 31-34 of 34 results.