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-40 of 54 results. Next

A214949 Numerator of sum of reciprocals of all nonzero digits of n in decimal representation.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Aug 02 2012

Keywords

Crossrefs

Cf. A214950 (denominators).

Programs

  • Haskell
    import Data.Ratio ((%), numerator)
    a214949 = f 0 where
       f y 0 = numerator y
       f y x = f (y + if d == 0 then 0 else 1 % d) x'
               where (x',d) = divMod x 10
    
  • Mathematica
    nsr[n_] := Numerator[Total[1/Select[IntegerDigits[n], # > 0 &]]]; nsr /@ Range[0, 79] (* Jayanta Basu, Jul 13 2013 *)
  • PARI
    a(n) = my(d=digits(n)); numerator(sum(k=1, #d, if (d[k], 1/d[k]))); \\ Michel Marcus, Jan 26 2022

Formula

a(A037264(n)) = a(A037268(n)) = a(A214958(n)) = a(A214959(n)) = 1;
a(n) = a(A004719(n)).

A214950 Denominator of sum of reciprocals of all nonzero digits of n in decimal representation.

Original entry on oeis.org

1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 2, 2, 1, 6, 4, 10, 3, 14, 8, 18, 3, 3, 6, 3, 12, 15, 2, 21, 24, 9, 4, 4, 4, 12, 2, 20, 12, 28, 8, 36, 5, 5, 10, 15, 20, 5, 30, 35, 40, 45, 6, 6, 3, 2, 12, 30, 3, 42, 24, 18, 7, 7, 14, 21, 28, 35, 42
Offset: 0

Views

Author

Reinhard Zumkeller, Aug 02 2012

Keywords

Crossrefs

Cf. A214949 (numerators).

Programs

  • Haskell
    import Data.Ratio ((%), denominator)
    a214950 = f 0 where
       f y 0 = denominator y
       f y x = f (y + if d == 0 then 0 else 1 % d) x'
               where (x',d) = divMod x 10
    
  • Mathematica
    dsr[n_] := Denominator[Total[1/Select[IntegerDigits[n], # > 0 &]]]; dsr /@ Range[0, 76] (* Jayanta Basu, Jul 13 2013 *)
  • PARI
    a(n) = my(d=digits(n)); denominator(sum(k=1, #d, if (d[k], 1/d[k]))); \\ Michel Marcus, Jan 26 2022

Formula

a(A034708(n)) = a(A037268(n)) = a(A214957(n)) = a(A214959(n)) = 1;
a(n) = a(A004719(n)).

A243846 Numbers for which the nozero power-sequence of n falls into a loop.

Original entry on oeis.org

1, 366784, 14877, 531136, 29287878125, 13631616, 18916327, 1245376, 118971, 1, 24871, 1942272, 377414623, 361123756, 221285675921484375, 453559756, 16185473, 4136832, 113758939, 366784, 164961711, 3179798512, 131147731, 1841716224, 283439365914625, 118754727776
Offset: 1

Views

Author

Anthony Sand, Jun 12 2014

Keywords

Comments

Numbers returned by the following procedure: For n = 1, 2, 3, ..., let x(n; 1) = 1. Begin the recursive sequence x(n; i) = nozero(x(n; i-1) * n), where the function nozero(x) removes all zeros from x (see A004719). When x(n; i) = x(n; j
a(10*n) = a(n). - Pontus von Brömssen, May 19 2019

Examples

			a(2) = 366784 because x(2; 491) = nozero(183392 * 2) = 366784. Subsequently x(2; 527) = nozero(1533392 * 2) = nozero(3066784) = 366784, and this happens for the first time. Therefore x(2; 527) = x(2; 491) and the procedure returns x(2; 527) = 366784.
a(3) = 14877 because x(3; 28) = nozero(469359 * 3) = nozero(1408077) = 14877. Subsequently, x(3; 108) = nozero(4959 * 3) = 14877, and this happens for the first time. Therefore x(3; 28) = x(3; 108) and the procedure returns x(3;108) = 14877.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Block[{h = <||>, t = n}, While[! KeyExistsQ[h,t], h[t]=0; t = FromDigits@ Select[ IntegerDigits[n t], # > 0 &]]; t]; Array[a, 20] (* Giovanni Resta, May 20 2019 *)

Formula

Recurrence: x(n; i) = nozero(x(n; i-1) * n), x(n; 1) = 1, i >= 2, with n >= 1. For example, for x(2;10) = 512 and nozero(512 * 2) = nozero(1024) = 124. Therefore x(2;11) = 124.
If the sequence {x(n; i)}_{i >= 1} becomes periodic at some entry x(n; j), that is if there exists a period length L(n) such that x(n; i + L(n)) = x(n; i) for i >= j then a(n) = x(n; j). If there is no such period length then one puts a(n) = 0.

Extensions

Edited: Comment, formula and example reformulated. - Wolfdieter Lang, Jul 13 2014
a(5), a(6), a(8), a(9) corrected by Pontus von Brömssen, May 19 2019
a(10)-a(26) from Giovanni Resta, May 20 2019

A125290 Numbers with at least two distinct digits in decimal representation, none of which is 0.

Original entry on oeis.org

12, 13, 14, 15, 16, 17, 18, 19, 21, 23, 24, 25, 26, 27, 28, 29, 31, 32, 34, 35, 36, 37, 38, 39, 41, 42, 43, 45, 46, 47, 48, 49, 51, 52, 53, 54, 56, 57, 58, 59, 61, 62, 63, 64, 65, 67, 68, 69, 71, 72, 73, 74, 75, 76, 78, 79, 81, 82, 83, 84, 85, 86, 87, 89, 91, 92, 93, 94, 95, 96, 97, 98, 112, 113, 114, 115, 116, 117, 118, 119, 121, 122, 123
Offset: 1

Author

Reinhard Zumkeller, Nov 26 2006

Keywords

Comments

Also numbers having at least two partitions into digit values of their decimal representations: A061827(a(n)) > 1.
First differs from A101594 at a(83) = 123 != 131 = A101594(83). - Michael S. Branicky, Dec 13 2021

Crossrefs

Subsequence of A052382. Supersequence of A101594.

Programs

  • Haskell
    a125290 n = a125290_list !! (n-1)
    a125290_list = filter ((> 1) . a043537) a052382_list
    -- Reinhard Zumkeller, Jun 18 2013
    
  • Mathematica
    Select[Range[200], FreeQ[#, 0] && Length[Union[#]] > 1 & [IntegerDigits[#]] &] (* Paolo Xausa, May 06 2024 *)
  • Python
    def ok(n): s = set(str(n)); return len(s) >= 2 and "0" not in s
    print([k for k in range(124) if ok(k)]) # Michael S. Branicky, Dec 13 2021

Formula

A043537(A004719(a(n))) > 1.
A168046(a(n)) * A043537(A004719(a(n))) > 1. - Reinhard Zumkeller, Jun 18 2013
a(n) ~ n. - Charles R Greathouse IV, Feb 13 2017

Extensions

Name clarified by Michael S. Branicky, Dec 13 2021

A004177 Omit 2's from n.

Original entry on oeis.org

0, 1, 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 1, 13, 14, 15, 16, 17, 18, 19, 0, 1, 0, 3, 4, 5, 6, 7, 8, 9, 30, 31, 3, 33, 34, 35, 36, 37, 38, 39, 40, 41, 4, 43, 44, 45, 46, 47, 48, 49, 50, 51, 5, 53, 54, 55, 56, 57, 58, 59, 60, 61, 6, 63, 64, 65, 66, 67, 68, 69, 70, 71, 7, 73, 74
Offset: 0

Keywords

Programs

  • Maple
    f:= proc(n) local L,i;
         L:= subs(2=NULL,convert(n,base,10));
         add(L[i]*10^(i-1),i=1..nops(L))
    end proc:
    map(f, [$0..100]); # Robert Israel, Sep 15 2024
  • Mathematica
    Table[FromDigits[DeleteCases[IntegerDigits[n],2]],{n,0,80}] (* Harvey P. Dale, Feb 12 2022 *)

A243845 Numbers generated by recursive procedure a(n) = nozero(a(n-1) * 3), in which the function nozero(x) removes all zeros from x, starting with a(1) = 1.

Original entry on oeis.org

1, 3, 9, 27, 81, 243, 729, 2187, 6561, 19683, 5949, 17847, 53541, 16623, 49869, 14967, 4491, 13473, 4419, 13257, 39771, 119313, 357939, 173817, 521451, 1564353, 469359, 14877, 44631, 133893, 41679, 12537, 37611, 112833, 338499, 115497, 346491, 139473, 418419
Offset: 1

Author

Anthony Sand, Jun 12 2014

Keywords

Comments

Numbers in the following sequence: Let a(1) = 1, then begin the recursive sequence a(n) = nozero(a(n-1) * 3), where the function nozero(x) removes all zeros from x.
The sequence returns standard powers of 3 until step 11, where a(11) = nozero(19683 * 3) = nozero(59049) = 5949.
At step 28, a(28) = nozero(469359 * 3) = nozero(1408077) = 14877. At step 108, a(108) = nozero(4959 * 3) = 14877. Therefore a(28) = a(108) and the sequence repeats. Because this is the first instance where a member of this sequence is repeated one has a(n + L) = a(n) for n >= 28 with the primitive (least) period length L = 108 - 28 = 80.

Examples

			a(2) = nozero(3*a(1)) = nozero(3) = 3.
		

Crossrefs

Programs

  • Mathematica
    NestList[FromDigits@ DeleteCases[IntegerDigits[3 #], ?(# == 0 &)] &, 1, 38] (* _Michael De Vlieger, Jun 27 2020 *)
  • Sage
    L=[1]
    for i in [1..108]:
        T=(3*L[i-1]).digits(base=10)
        TT=filter(lambda a: a != 0, T)
        L.append(sum(TTi*10^i for i, TTi in enumerate(TT)))
    L # - Tom Edgar, Jun 17 2014

Formula

a(n) = A004719(a(n-1) * 3) for n>1, a(1) = 1.

Extensions

Edited: Name, comments and formula reformulated. - Wolfdieter Lang, Jul 13 2014

A247796 From right to left in decimal representation of n: replace each maximal set of adjacent digits with their sum, if this sum is less than 10.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 19, 2, 3, 4, 5, 6, 7, 8, 9, 28, 29, 3, 4, 5, 6, 7, 8, 9, 37, 38, 39, 4, 5, 6, 7, 8, 9, 46, 47, 48, 49, 5, 6, 7, 8, 9, 55, 56, 57, 58, 59, 6, 7, 8, 9, 64, 65, 66, 67, 68, 69, 7, 8, 9, 73, 74, 75, 76, 77
Offset: 0

Author

Reinhard Zumkeller, Oct 08 2014

Keywords

Examples

			7654321: 7654[321] -> 7654[3+2+1] -> 76546 -> 76[54]6 -> 76[5+4]6 -> 7696 = a(7654321);
1234567: 123[45]67 -> 123[4+5]67 -> 123967 -> [123]967 -> [1+2+3]967 -> 6967 = a(1234567);
1111111: [1111111] -> [1+1+1+1+1+1+1] -> 7 = a(1111111);
a(7777777) = 7777777;
90909: 909[09] -> 909[0+9] -> 9099 -> 9[09]9 -> 9[0+9]9 -> 999 = a(90909);
20202: [20202] -> [2+0+2+0+2] -> 6 = a(20202).
		

Crossrefs

Programs

  • Haskell
    a247796 = f 0 where
       f s 0 = s
       f s x = if s + d < 10 then f (s + d) x' else (f d x') * 10 + s
               where (x', d) = divMod x 10
    
  • PARI
    A247796(n,d=digits(n))={forstep(k=#d,2,-1,if(d[k-1]+d[k]<10, d[k-1]+=d[k]; d=d[^k]));fromdigits(d)} /* or: (about 10% faster) */
    A247796(n,u=1)={until(n<10*u*=10,my(m=n\u);while(m>9&&sumdigits(m%100)<10, m=vecsum(divrem(m,10));n=m*u+n%u));n} \\ Trying to reduce the number of redefinitions of n yields slower code. M. F. Hasler, Jan 29 2018

Formula

a(n) <= n; a(A248013(n)) = A248013(n); a(A248014(n)) < A248014(n);
a(n) = a(a(n)) = a(A004719(n)) = a(n * 10^k).

Extensions

Edited by M. F. Hasler, Jan 29 2018

A356757 Omit zero digits from factorial numbers.

Original entry on oeis.org

1, 1, 2, 6, 24, 12, 72, 54, 432, 36288, 36288, 399168, 47916, 622728, 871782912, 137674368, 2922789888, 35568742896, 64237375728, 121645148832, 243292817664, 5199421717944, 11247277776768, 258521673888497664, 624484173323943936, 15511214333985984, 4329146112665635584
Offset: 0

Author

Stefano Spezia, Aug 26 2022

Keywords

Examples

			a(12) = 47916 since 12! = 479001600.
		

Crossrefs

Cf. A027869 (number of omitted zero digits), A356758 (number of nonzero digits).

Programs

  • Mathematica
    Table[FromDigits[Select[IntegerDigits[n!],Positive]], {n,0,26}]
  • PARI
    a(n) = fromdigits(select(x->(x>0), digits(n!))); \\ Michel Marcus, Aug 26 2022
    
  • Python
    from math import factorial
    def a(n): return int(str(factorial(n)).replace("0", ""))
    print([a(n) for n in range(27)]) # Michael S. Branicky, Aug 26 2022

Formula

a(n) = A004719(A000142(n)).

A373170 Main diagonal of A373169.

Original entry on oeis.org

1, 3, 9, 22, 45, 81, 43, 24, 288, 118, 138, 585, 184, 918, 288, 232, 294, 351, 559, 2586, 1179, 3586, 117, 72, 3913, 2949, 5949, 1585, 7239, 8811, 3595, 3789, 3537, 5758, 1968, 18, 6454, 4152, 4374, 1687, 549, 7794, 3922, 8313, 828, 2674, 4251, 2646, 5548, 3636, 3879, 799
Offset: 2

Author

Paolo Xausa, May 28 2024

Keywords

Comments

a(n) is the zeroless analog of the (n-1)-th n-gonal number.

Crossrefs

Programs

  • Mathematica
    noz[n_] := FromDigits[DeleteCases[IntegerDigits[n], 0]];
    A373170[n_] := Fold[noz[#2*(n-2) + 1 + #] &, 1, Range[n-2]];
    Array[A373170, 100, 2]

Formula

a(n) = A373169(n,n-1).

A275536 Differences of the exponents of the adjacent distinct powers of 2 in the binary representation of n (with -1 subtracted from the least exponent present) are concatenated as decimal digits in reverse order.

Original entry on oeis.org

1, 2, 11, 3, 12, 21, 111, 4, 13, 22, 112, 31, 121, 211, 1111, 5, 14, 23, 113, 32, 122, 212, 1112, 41, 131, 221, 1121, 311, 1211, 2111, 11111, 6, 15, 24, 114, 33, 123, 213, 1113, 42, 132, 222, 1122, 312, 1212, 2112, 11112
Offset: 1

Author

Armands Strazds, Aug 01 2016

Keywords

Comments

A preferable representation is a sequence of arrays, since multi-digit items are possible: [1],[2],[1,1],[3],[1,2],[2,1],[1,1,1],[4],[1,3],[2,2],[1,1,2],[3,1],[1,2,1],[2,1,1],[1,1,1,1],[5],[1,4],[2,3],[1,1,3],[3,2],[1,2,2],[2,1,2],[1,1,1,2],[4,1],[1,3,1],[2,2,1],[1,1,2,1],[3,1,1],[1,2,1,1],[2,1,1,1],[1,1,1,1,1],[6],[1,5],[2,4],[1,1,4],[3,3],[1,2,3],[2,1,3],[1,1,1,3],[4,2],[1,3,2],[2,2,2],[1,1,2,2],[3,1,2],[1,2,1,2],[2,1,1,2],[1,1,1,1,2]. 0 is not allowed as a digit.
a(512) is the first term which cannot be expressed unambiguously in decimal. - Charles R Greathouse IV, Aug 02 2016
The first two terms which are equal (because of the ambiguity inherent in using decimal, or more generally any finite base) are a(3) = a(1024) = 11. a(3) corresponds to the array [1,1] while a(1024) corresponds to [11]. - Charles R Greathouse IV, Mar 19 2017

Examples

			5 = 2^2 + 2^0, so the representation is [2-0, 0-(-1)] = [2, 1] so a(5) = 12.
6 = 2^2 + 2^1, so the representation is [2-1, 1-(-1)] = [1, 2] so a(6) = 21.
18 = 2^4 + 2^1, so the representation is [4-1, 1-(-1)] = [3, 2] so a(18) = 23.
		

Programs

  • PARI
    a(n)=my(v=List(),k); while(n, k=valuation(n,2)+1; n>>=k; listput(v,k)); fromdigits(Vec(v)) \\ Charles R Greathouse IV, Aug 02 2016
  • PHP
    function dec2delta($k) {
      $p = -1;
      while ($k > 0) {
        $k -= $c = pow(2, floor(log($k, 2)));
        if ($p > -1) $d[] = $p - floor(log($c, 2));
        $p = floor(log($c, 2));
      }
      $d[] = $p + 1;
      return array_reverse($d);
    }
    function delta2dec($d) {
      $k = 0;
      $e = -1;
      foreach ($d AS $v) {
        if ($v > 0) {
          $e += $v;
          $k += pow(2, $e);
        }
      }
      return $k;
    }
    

Formula

For n=1..511, a(n) = A004086(A004719(A071160(n))) [In other words, terms of A071160 with 0-digits deleted and the remaining digits reversed.] - Antti Karttunen, Sep 03 2016
Previous Showing 31-40 of 54 results. Next