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

A252079 Fixed points of permutations A252022 and A252023.

Original entry on oeis.org

1, 2, 3, 4, 5, 36, 72, 125, 136, 900, 4454, 8021, 27223, 33905, 73222, 127536, 146353, 180177, 234668, 273241
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 13 2014

Keywords

Crossrefs

Programs

  • Haskell
    a252079 n = a252079_list !! (n-1)
    a252079_list = [x | x <- [1..], a252022 x == x]
    
  • Python
    A252079_list, l, s, b = [1], [1], 2, set()
    for n in range(2, 10**5):
        i = s
        while True:
            if i not in b:
                li = [int(d) for d in str(i)[::-1]]
                for x, y in zip(li, l):
                    if x+y > 9:
                        break
                else:
                    l = li
                    b.add(i)
                    if i == n:
                        A252079_list.append(i)
                    while s in b:
                        b.remove(s)
                        s += 1
                    break
            i += 1 # Chai Wah Wu, Dec 14 2014

Extensions

a(16)-a(20) from Chai Wah Wu, Dec 14 2014

A252023 Inverse permutation to A252022.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 9, 15, 21, 6, 8, 10, 11, 12, 13, 17, 19, 23, 41, 14, 16, 18, 25, 26, 27, 29, 34, 43, 50, 20, 24, 28, 30, 31, 32, 36, 45, 53, 58, 22, 33, 35, 37, 38, 39, 47, 56, 60, 90, 40, 44, 46, 48, 62, 64, 74, 80, 92, 105, 42, 54, 66, 68, 76, 78, 82, 94
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 12 2014

Keywords

Crossrefs

Cf. A252022 (inverse), A252079 (fixed points).

Programs

  • Haskell
    import Data.List (elemIndex); import Data.Maybe (fromJust)
    a252023 = (+ 1) . fromJust . (`elemIndex` a252022_list)

A262604 First difference of A252022.

Original entry on oeis.org

1, 1, 1, 1, 5, -4, 5, -4, 5, 1, 1, 1, 5, -12, 13, -5, 6, -5, 13, -21, 31, -22, 13, -8, 1, 1, 7, -6, 7, 1, 1, 6, -14, 15, -6, 7, 1, 1, 5, -31, 41, -32, 23, -14, 15, -6, 7, 47, -71, 41, 31, -63, 23, 41, -55, 63, -71, 81, -72, 63, -57, 49, -48, 49, -42, 43, -42
Offset: 1

Views

Author

Paul Tek, Sep 26 2015

Keywords

Comments

The graph of the sequence exhibits a kind of symmetry around the X-axis.

Crossrefs

Cf. A252022.

Programs

  • Haskell
    a262604 n = a262604_list !! (n-1)
    a262604_list = zipWith (-) (tail a252022_list) a252022_list
    -- Reinhard Zumkeller, Sep 27 2015

Formula

a(n) = A252022(n+1) - A252022(n) for any n>0.

A252001 Lexicographically earliest permutation of the positive integers, such that a carry occurs when adjacent terms are added in decimal representation.

Original entry on oeis.org

1, 9, 2, 8, 3, 7, 4, 6, 5, 15, 16, 14, 17, 13, 18, 12, 19, 11, 29, 21, 39, 22, 28, 23, 27, 24, 26, 25, 35, 36, 34, 37, 33, 38, 32, 48, 42, 49, 31, 59, 41, 60, 40, 61, 43, 47, 44, 46, 45, 55, 50, 51, 52, 53, 54, 56, 57, 58, 62, 63, 64, 65, 66, 67, 68, 69, 70
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 12 2014

Keywords

Comments

a(n+1) = smallest number, not occurring earlier, such that a carry occurs when adding it to a(n) in decimal arithmetic.

Crossrefs

Cf. A252022 (no carries); A252002 (inverse), A252078 (fixed points), A251984, A167831.
Cf. A262703 (first differences).

Programs

  • Haskell
    import Data.List (delete)
    a252001 n = a252001_list !! (n-1)
    a252001_list = 1 : f [1] (drop 2 a031298_tabf) where
       f xs zss = g zss where
         g (ds:dss) = if any (> 9) $ zipWith (+) xs ds
           then (foldr (\d v -> 10 * v + d) 0 ds) : f ds (delete ds zss)
           else g dss

A329804 Lexicographically earliest sequence of distinct positive integers such that the product a(n)*a(n+1) is "doubly true" (see the Comments section).

Original entry on oeis.org

1, 2, 3, 10, 4, 16, 20, 5, 19, 30, 6, 21, 40, 7, 50, 8, 60, 9, 70, 11, 80, 12, 90, 13, 18, 38, 100, 14, 46, 105, 22, 61, 36, 103, 34, 106, 15, 93, 108, 25, 102, 35, 41, 29, 104, 26, 110, 17, 120, 23, 28, 109, 37, 130, 24, 72, 107, 43, 140, 27, 62, 31, 150, 32
Offset: 1

Views

Author

Eric Angelini and Lars Blomberg, Nov 21 2019

Keywords

Comments

A "doubly true" product p*q has the property that the numerical product p*q is r and (the product of the digits of p) times (the product of the digits of q) is equal to the product of the digits of r.
As the sequence can always be extended with an integer ending in zero, it is infinite.
The sequence is a permutation of the positive integers.

Examples

			13*18 = 234 and (1*3)*(1*8) = 2*3*4
18*38 = 684 and (1*8)*(3*8) = 6*8*4
38*100 = 3800 and (3*8)*(1*0*0) = 3*8*0*0.
		

Crossrefs

Cf. A007954, A252022 (same idea, but with doubly true additions).

Programs

  • PARI
    dp(m) = vecprod(digits(m))
    { s=0; u=v=1; for (n=1, 64, print1 (v", "); s+=2^v; while (bittest(s,u), u++); for (w=u, oo, if (!bittest(s,w) && dp(v)*dp(w)==dp(v*w), v=w; break))) } \\ Rémy Sigrist, Nov 21 2019

Extensions

Edited by N. J. A. Sloane, Dec 09 2019

A336193 Lexicographically earliest sequence of distinct positive integers such that for any n > 0, n + a(n) can be computed without carry in base 10.

Original entry on oeis.org

1, 2, 3, 4, 10, 11, 12, 20, 30, 5, 6, 7, 13, 14, 21, 22, 31, 40, 50, 8, 15, 16, 23, 24, 32, 33, 41, 51, 60, 9, 17, 25, 26, 34, 42, 43, 52, 61, 100, 18, 27, 35, 36, 44, 53, 101, 102, 110, 120, 19, 28, 37, 45, 103, 104, 111, 112, 121, 130, 29, 38, 105, 106, 113
Offset: 1

Views

Author

Rémy Sigrist, Jul 11 2020

Keywords

Comments

This sequence is a decimal variant of A238757.
This sequence is a self-inverse permutation of the natural numbers.

Examples

			The first terms, alongside n + a(n), are:
  n   a(n)  n+a(n)
  --  ----  ------
   1     1       2
   2     2       4
   3     3       6
   4     4       8
   5    10      15
   6    11      17
   7    12      19
   8    20      28
   9    30      39
  10     5      15
  11     6      17
  12     7      19
  13    13      26
  14    14      28
  15    21      36
		

Crossrefs

Programs

  • PARI
    s=0; for (n=1, 64, for (v=1, oo, if (!bittest(s,v) && sumdigits(n+v)==sumdigits(n)+sumdigits(v), print1(v", "); s+=2^v; break)))

Formula

A007953(n + a(n)) = A007953(n) + A007953(a(n)).

A352877 Lexicographically earliest sequence of distinct nonnegative terms such that two consecutive terms can be added without carries in base 3.

Original entry on oeis.org

0, 1, 3, 2, 6, 9, 4, 10, 7, 18, 5, 12, 11, 15, 27, 8, 36, 13, 28, 16, 37, 30, 14, 39, 29, 21, 31, 19, 33, 20, 54, 17, 63, 81, 22, 55, 24, 56, 84, 23, 57, 82, 25, 108, 26, 135, 83, 42, 38, 87, 45, 32, 48, 85, 40, 90, 34, 46, 88, 64, 91, 43, 109, 49, 111, 41, 93
Offset: 0

Views

Author

Rémy Sigrist, Apr 06 2022

Keywords

Comments

This sequence is a permutation of the positive integers, analogous to A109812 and A252022.

Examples

			The first terms, alongside their ternary expansions, are:
  n   a(n)  ter(a(n))
  --  ----  ---------
   0     0          0
   1     1          1
   2     3         10
   3     2          2
   4     6         20
   5     9        100
   6     4         11
   7    10        101
   8     7         21
   9    18        200
  10     5         12
  11    12        110
  12    11        102
		

Crossrefs

Cf. A109812 (binary analog), A252022 (decimal analog).

Programs

  • PARI
    See Links section.
Showing 1-7 of 7 results.