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 41-50 of 243 results. Next

A309959 Product of digits of (n written in base 8).

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Aug 24 2019

Keywords

Crossrefs

Product of digits of (n written in base k): A309953 (k = 3), A309954 (k = 4), A309956 (k = 5), A309957 (k = 6), A309958 (k = 7), this sequence (k = 8), A309788 (k = 9), A007954 (k = 10).

Programs

  • Magma
    [0] cat [&*Intseq(n,8):n in [1..100]]; // Marius A. Burtea, Aug 25 2019
  • Mathematica
    Table[Times @@ IntegerDigits[n, 8], {n, 0, 100}]

Formula

G.f. A(x) satisfies: A(x) = x * (1 + 2*x + 3*x^2 + 4*x^3 + 5*x^4 + 6*x^5 + 7*x^6) * (1 + A(x^8)).

A346731 Replace 8^k with (-1)^k in base-8 expansion of n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, -1, 0, 1, 2, 3, 4, 5, 6, -2, -1, 0, 1, 2, 3, 4, 5, -3, -2, -1, 0, 1, 2, 3, 4, -4, -3, -2, -1, 0, 1, 2, 3, -5, -4, -3, -2, -1, 0, 1, 2, -6, -5, -4, -3, -2, -1, 0, 1, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, -1, 0, 1, 2, 3, 4, 5, 6, -2, -1, 0, 1, 2, 3, 4, 5, -3, -2, -1, 0, 1, 2, 3, 4, -4
Offset: 0

Views

Author

Ilya Gutkovskiy, Jul 30 2021

Keywords

Comments

If n has base-8 expansion abc..xyz with least significant digit z, a(n) = z - y + x - w + ...

Examples

			79 = 117_8, 7 - 1 + 1 = 7, so a(79) = 7.
		

Crossrefs

Programs

  • Mathematica
    nmax = 104; A[] = 0; Do[A[x] = x (1 + 2 x + 3 x^2 + 4 x^3 + 5 x^4 + 6 x^5 + 7 x^6)/(1 - x^8) - (1 + x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7) A[x^8] + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x]
    Table[n + 9 Sum[(-1)^k Floor[n/8^k], {k, 1, Floor[Log[8, n]]}], {n, 0, 104}]
  • Python
    from sympy.ntheory.digits import digits
    def a(n):
        return sum(bi*(-1)**k for k, bi in enumerate(digits(n, 8)[1:][::-1]))
    print([a(n) for n in range(105)]) # Michael S. Branicky, Jul 31 2021

Formula

G.f. A(x) satisfies: A(x) = x * (1 + 2*x + 3*x^2 + 4*x^3 + 5*x^4 + 6*x^5 + 7*x^6) / (1 - x^8) - (1 + x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7) * A(x^8).
a(n) = n + 9 * Sum_{k>=1} (-1)^k * floor(n/8^k).

A037405 Numbers k such that every base-8 digit of k is a base-9 digit of k.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 9, 18, 27, 36, 45, 54, 63, 73, 124, 137, 146, 177, 210, 219, 283, 284, 292, 356, 365, 429, 438, 502, 511, 568, 576, 586, 763, 768, 769, 772, 897, 906, 942, 945, 946, 950, 970, 1100, 1152, 1163, 1172, 1199, 1474
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    import Data.List ((\\), nub)
    a037405 n = a037405_list !! (n-1)
    a037405_list = filter f [1..] where
       f x = null $ nub (ds 8 x) \\ nub (ds 9 x)
       ds b x = if x > 0 then d : ds b x' else []  where (x', d) = divMod x b
    -- Reinhard Zumkeller, May 30 2013
  • Mathematica
    bQ[n_]:=Module[{idn8=Union[IntegerDigits[n,8]],idn9=Union[ IntegerDigits[ n,9]]},And@@ (MemberQ[ idn9,#]&/@idn8)]; Select[Range[1500],bQ] (* Harvey P. Dale, Jul 17 2011 *)

A037442 Positive numbers having the same set of digits in base 8 and base 10.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 614, 1124, 1233, 1273, 1653, 2154, 2466, 3160, 3161, 3162, 3163, 3164, 3165, 3166, 3167, 3226, 4100, 4711, 5117, 5213, 5421, 6414, 6541, 7105, 7125, 7135, 7151, 7671, 10241, 11257, 11625, 11662, 11726, 13000, 13271, 13320
Offset: 1

Views

Author

Keywords

Examples

			1233 is in the sequence because 1233 in base 8 is 2321.
		

Crossrefs

Subsequence of A037406.

Programs

  • Mathematica
    Select[Range@ 13400, Union@ IntegerDigits[#, 8] == Union@ IntegerDigits@ # &] (* Michael De Vlieger, Feb 18 2017 *)
  • PARI
    isok(n) = Set(digits(n, 8)) == Set(digits(n)); \\ Michel Marcus, Feb 18 2017

Extensions

More terms from Don Reble, Apr 28 2006
Edited by John Cerkan, Feb 17 2017

A037849 a(n) = Sum_{d(i) < d(i-1), i=1..m} (d(i-1) - d(i)), where Sum{d(i)*8^i: i=0,1,...,m} is the base-8 representation of n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 0, 0, 0, 1, 2, 3, 4, 5, 0, 0, 0, 0, 1, 2, 3, 4, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 0, 0, 1, 2, 3, 4, 5, 6, 1, 1, 1, 2, 3, 4, 5, 6, 2, 2, 2
Offset: 1

Views

Author

Keywords

Comments

This is the base-8 up-variation sequence; see A297330. - Clark Kimberling, Jan 18 2017

Crossrefs

Programs

  • Maple
    A037849 := proc(n)
        a := 0 ;
        dgs := convert(n,base,8);
        for i from 2 to nops(dgs) do
            if op(i,dgs)R. J. Mathar, Oct 19 2015
  • Mathematica
    g[n_, b_] := Differences[IntegerDigits[n, b]]; b = 8; z = 120;
    Table[-Total[Select[g[n, b], # < 0 &]], {n, 1, z}];  (* A037858 *)
    Table[Total[Select[g[n, b], # > 0 &]], {n, 1, z}];   (* A037849 *)

Extensions

Definition swapped with A037858 by R. J. Mathar, Oct 19 2015
Updated by Clark Kimberling, Jan 19 2018

A044879 Numbers having, in base 8, (sum of even run lengths)=(sum of odd run lengths).

Original entry on oeis.org

513, 514, 515, 516, 517, 518, 519, 521, 530, 539, 548, 557, 566, 575, 577, 578, 579, 580, 581, 582, 583, 592, 593, 595, 596, 597, 598, 599, 600, 601, 602, 604, 605, 606, 607, 608, 609, 610, 611, 613, 614, 615, 616, 617, 618
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Python
    from itertools import groupby
    def ok(n):
        rl_sums = [0, 0]
        for k, g in groupby(oct(n)[2:]):
            rl = len(list(g))
            rl_sums[rl%2] += rl
        return rl_sums[0] == rl_sums[1]
    print(list(filter(ok, range(619)))) # Michael S. Branicky, Sep 11 2021

A331565 The base 10 numbers with a digit product > 0 and which when written in bases 3,4,5,6,7,8,9 have two or more other base representations with the same digit product.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 91, 491, 921, 1138, 1234, 4853, 13581, 23568, 29242, 42161, 42162, 42163, 42164, 42991, 43365, 44313, 83342, 83651, 85226, 114382, 153881, 155462, 159422, 232868, 291862, 296183, 352486, 372642, 398543, 419563, 441194, 465326, 616146, 625431, 625523, 635813
Offset: 1

Views

Author

Scott R. Shannon, Jan 20 2020

Keywords

Comments

For terms 10 < a(n) < 10^9 none have a base-3 representation whose digit product equals the base-10 product. The first such entry using the base-4 representation is 491.

Examples

			6 is a term as 6_10 = 6_7 = 6_8 = 6_9, so it has three other base representations where the digit product also equals 6.
91 is a term as 91_10 = 331_5 = 133_8, so it has two other base representations where the digit product also equals 9.
491 is a term as 491_10 = 13223_4 = 3431_5, so it has two other base representations where the digit product also equals 36.
		

Crossrefs

Subsequence of A052382 (zeroless numbers).

Programs

  • Mathematica
    proDig[n_, b_] := Times @@ IntegerDigits[n, b]; seqQ[n_] := Module[{prod = proDig[n, 10], count = 0}, If[prod > 0, Do[If[proDig[n, b] == prod, count++]; If[count == 2, Break[]], {b, 3, 9}]]; count == 2]; Select[Range[650000], seqQ] (* Amiram Eldar, Jan 21 2020 *)
  • PARI
    isok(n) = {my(p=vecprod(digits(n))); (p != 0) && (sum(k=3, 9, p==vecprod(digits(n,k))) >= 2);} \\ Michel Marcus, Jan 21 2020

A004691 Fibonacci numbers written in base 8.

Original entry on oeis.org

0, 1, 1, 2, 3, 5, 10, 15, 25, 42, 67, 131, 220, 351, 571, 1142, 1733, 3075, 5030, 10125, 15155, 25302, 42457, 67761, 132440, 222421, 355061, 577502, 1154563, 1754265, 3131050, 5105335, 10236405, 15343742
Offset: 0

Views

Author

Keywords

Crossrefs

CF. A000045 (Fibonacci), A007094 (numbers in base 8).

Programs

  • Magma
    [Seqint(Intseq(Fibonacci(n),8)): n in [0..50]]; // G. C. Greubel, Oct 09 2018
  • Mathematica
    FromDigits[IntegerDigits[#, 8]] & / @ Fibonacci[Range[0, 40]] (* Vincenzo Librandi, Jun 08 2013 *)
  • PARI
    vector(50, n, n--; fromdigits(digits(fibonacci(n), 8))) \\ G. C. Greubel, Oct 09 2018
    

A008557 Repeatedly convert from decimal to octal.

Original entry on oeis.org

8, 10, 12, 14, 16, 20, 24, 30, 36, 44, 54, 66, 102, 146, 222, 336, 520, 1010, 1762, 3342, 6416, 14420, 34124, 102514, 310162, 1135622, 4252006, 20160546, 114720042, 665476452, 4752456544, 43321135540, 502611010664, 7240574662150, 151272370273006
Offset: 1

Views

Author

sbv(AT)VNET.IBM.COM (Scott Vetter), msvetter(AT)eng.xyplex.com (Mark Vetter)

Keywords

Crossrefs

Programs

  • Haskell
    a008557 n = a008557_list !! (n-1)
    a008557_list = iterate a007094 8  -- Reinhard Zumkeller, Aug 29 2013
    
  • Mathematica
    NestList[ FromDigits[ IntegerDigits[ #, 8 ]] &, 8, 35 ]
  • Python
    def aupton(terms):
        alst = [8]
        for n in range(2, terms+1): alst.append(int(oct(alst[-1])[2:]))
        return alst
    print(aupton(35)) # Michael S. Branicky, Aug 10 2021

Formula

a(n+1) = A007094(a(n)), a(1) = 8. - Reinhard Zumkeller, Aug 29 2013

A033021 Numbers whose base-8 expansion has no run of digits with length < 2.

Original entry on oeis.org

9, 18, 27, 36, 45, 54, 63, 73, 146, 219, 292, 365, 438, 511, 576, 585, 594, 603, 612, 621, 630, 639, 1152, 1161, 1170, 1179, 1188, 1197, 1206, 1215, 1728, 1737, 1746, 1755, 1764, 1773, 1782, 1791, 2304, 2313, 2322, 2331, 2340
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A007094.

Programs

  • Mathematica
    Select[Range[10000], Min[Length/@Split[IntegerDigits[#, 8]]]>1&] (* Vincenzo Librandi, Feb 05 2014 *)
Previous Showing 41-50 of 243 results. Next