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 11-20 of 23 results. Next

A217657 Delete the initial digit in decimal representation of n.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Oct 10 2012

Keywords

Comments

When n - a(n)*10^[log_10 n] >= 10^[(log_10 n) - 1], where [] denotes floor, or when n < 100 and 10|n, n is the concatenation of A000030(n) and a(n) - corrected by Glen Whitney, Jul 01 2022
a(110) = 10 is the first term > 9. The sequence consists of 10 repetitions of 0 (n = 0..9), then 9 repetitions of {0, ..., 9} (n = 10..99), then 9 repetitions of {0, ..., 99} (n = 100..999), and so on. - M. F. Hasler, Oct 18 2017

Crossrefs

Cf. A059995 (drop final digit of n), A000030 (initial digit of n), A202262.

Programs

  • Haskell
    a217657 n | n <= 9    = 0
              | otherwise = 10 * a217657 n' + m where (n', m) = divMod n 10
    
  • Mathematica
    Array[FromDigits@ Rest@ IntegerDigits@ # &, 121, 0] (* Michael De Vlieger, Dec 22 2019 *)
  • PARI
    apply( A217657(n)=n%10^logint(n+!n,10), [0..199]) \\ M. F. Hasler, Oct 18 2017, edited Dec 22 2019
    
  • Python
    def a(n): return 0 if n < 10 else int(str(n)[1:])
    print([a(n) for n in range(121)]) # Michael S. Branicky, Jul 01 2022

Formula

a(n) = 0 if n <= 9, otherwise 10*a(floor(n/10)) + n mod 10.
a(n) = n mod 10^floor(log_10(n)), a(0) = 0. - M. F. Hasler, Oct 18 2017

Extensions

Data extended to include the first terms larger than 9, by M. F. Hasler, Dec 22 2019

A100910 Table of number of occurrences in n of each decimal digit from 0 to 9.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0
Offset: 0

Views

Author

Rick L. Shepherd, Nov 21 2004

Keywords

Comments

Each row of this table has length 10 and corresponds to one term of A100909. n = 0 is normally represented as the single digit 0, so the first row here is 1, 0, 0, 0, 0, 0, 0, 0, 0, 0.

Crossrefs

Cf. A100909 (similar but each row of A100910 provides one A100909 term).
Cf. A055642 (row sums), A055641 (column 0), A268643 (column 1), A316863 (column 2), A316864 (column 3), A316865 (column 4), A316866 (column 5), A316867 (column 6), A316868 (column 7), A316869 (column 8), A102683 (column 9).

Programs

  • Maple
    seq(seq(numboccur(k, convert(n,base,10)),k=0..9),n=0..100); # Robert Israel, Jul 08 2016
  • Mathematica
    A100910row[n_] := RotateRight[DigitCount[n]];
    Array[A100910row, 10, 0] (* Paolo Xausa, Jul 16 2025 *)
  • PARI
    T(n, k) = #select(x->x==k, digits(n))+!(n+k); \\ Jinyuan Wang, Mar 01 2020

Formula

From Robert Israel, Jul 08 2016: (Start)
a(n,k) = a(A059995(n),k) + (1 if A010879(n)=k, otherwise 0).
G.f. g(x,y) satisfies g(x,y) = ((1-x^10)/(1-x))*g(x^10,y) + (x^10-x)/(1-x) + x^10/(1-x^10) + x*y*(1-x^9*y^9)/((1-x^10)*(1-x*y)). (End)

A349194 a(n) is the product of the sum of the first i digits of n, as i goes from 1 to the total number of digits of n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 49, 56, 63, 70, 77
Offset: 1

Views

Author

Malo David, Nov 10 2021

Keywords

Comments

The only primes in the sequence are 2, 3, 5 and 7. - Bernard Schott, Nov 23 2021

Examples

			For n=256, a(256) = 2*(2+5)*(2+5+6) = 182.
		

Crossrefs

Cf. A055642, A284001 (binary analog), A349190 (fixed points).
Cf. A007953 (sum of digits), A059995 (floor(n/10)).
Cf. A349278 (similar, with the last digits).

Programs

  • Magma
    f:=func; [f(n):n in [1..100]]; // Marius A. Burtea, Nov 23 2021
  • Mathematica
    Table[Product[Sum[Part[IntegerDigits[n],j],{j,i}],{i,Length[IntegerDigits[n]]}],{n,74}] (* Stefano Spezia, Nov 10 2021 *)
  • PARI
    a(n) = my(d=digits(n)); prod(i=1, #d, sum(j=1, i, d[j])); \\ Michel Marcus, Nov 10 2021
    
  • PARI
    first(n)=if(n<9,return([1..n])); my(v=vector(n)); for(i=1,9,v[i]=i); for(i=10,n, v[i]=sumdigits(i)*v[i\10]); v \\ Charles R Greathouse IV, Dec 04 2021
    
  • Python
    from math import prod
    from itertools import accumulate
    def a(n): return prod(accumulate(map(int, str(n))))
    print([a(n) for n in range(1, 100)]) # Michael S. Branicky, Nov 10 2021
    

Formula

For n>10: a(n) = a(A059995(n))*A007953(n) where A059995(n) = floor(n/10).
In particular, for n<100: a(n) = floor(n/10)*A007953(n)
From Bernard Schott, Nov 23 2021: (Start)
a(n) = 1 iff n = 10^k, k >= 0 (A011557).
a(n) = 2 iff n = 10^k + 1, k >= 0 (A000533 \ {1}).
a(n) = 3 iff n = 10^k + 2, k >= 0 (A133384).
a(n) = 5 iff n = 10^k + 4, k >= 0.
a(n) = 7 iff n = 10^k + 6, k >= 0. (End)
From Marius A. Burtea, Nov 23 2021: (Start)
a(A002275(n)) = n! = A000142(n), n >= 1.
a(A090843(n - 1)) = (2*n - 1)!! = A001147(n), n >= 1.
a(A097166(n)) = (3*n - 2)!!! = A007559(n).
a(A093136(n)) = 2^n = A000079(n).
a(A093138(n)) = 3^n = A000244(n). (End)

A076312 a(n) = floor(n/10) + 2*(n mod 10).

Original entry on oeis.org

0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 7, 9, 11, 13, 15, 17, 19, 21
Offset: 0

Views

Author

Reinhard Zumkeller, Oct 06 2002

Keywords

Comments

Delete the last digit from n and add twice this digit to the shortened number. - N. J. A. Sloane, May 25 2019
(n==0 modulo 19) iff (a(n)==0 modulo 19); applied recursively, this property provides a useful test for divisibility by 19.

Examples

			26468 is not a multiple of 19, as 26468 -> 2646+2*8=2662 -> 266+2*2=270 -> 27+2*0=27=19*1+8, therefore the answer is NO.
Is 12882 divisible by 19? 12882 -> 1288+2*2=1292 -> 129+2*2=133 -> 13+2*3=19, therefore the answer is YES.
		

References

  • Erdős, Paul, and János Surányi. Topics in the Theory of Numbers. New York: Springer, 2003. Problem 6, page 3.
  • Karl Menninger, Rechenkniffe, Vandenhoeck & Ruprecht in Goettingen (1961), 79A.

Crossrefs

Programs

  • Haskell
    a076312 n =  n' + 2 * m where (n', m) = divMod n 10
    -- Reinhard Zumkeller, Jun 01 2013
    
  • Magma
    [Floor(n/10) + 2*(n mod 10): n in [0..100]]; // Vincenzo Librandi, Mar 05 2020
  • Mathematica
    f[n_]:=Module[{idn=IntegerDigits[n]},FromDigits[Most[idn]]+2idn[[-1]]]; Array[ f,80,0] (* Harvey P. Dale, Mar 01 2020 *)

Formula

G.f.: -x(17x^9-2-2x-2x^2-2x^3-2x^4-2x^5-2x^6-2x^7-2x^8)/((1-x)^2(1+x)(x^4+x^3+x^2+x+1)(x^4-x^3+x^2-x+1)). a(n)=A059995(n)+2*A010879(n). [R. J. Mathar, Jan 24 2009]

A074867 a(n) = M(a(n-1)) + M(a(n-2)) where a(1)=a(2)=1 and M(k) is the product of the digits of k in base 10.

Original entry on oeis.org

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

Views

Author

Felice Russo, Sep 11 2002

Keywords

Comments

Periodic with least period 60. - Christopher N. Swanson (cswanson(AT)ashland.edu), Jul 22 2003
From Hieronymus Fischer, Jul 01 2007: (Start)
The digital product analog (in base 10) of the Fibonacci recurrence.
a(n) and Fib(n)=A000045(n) are congruent modulo 10 which implies that (a(n) mod 10) is equal to (Fib(n) mod 10) = A003893(n). Thus (a(n) mod 10) is periodic with the Pisano period A001175(10)=60.
a(n)==A131297(n) modulo 10 (A131297(n)=digital sum analog base 11 of the Fibonacci recurrence).
For general bases p>1, we have the inequality 1<=a(n)<=2p-2 (for n>0). Actually, a(n)<=18.
(End)

Crossrefs

Programs

  • Mathematica
    nxt[{a_,b_}]:={b,Times@@IntegerDigits[a]+Times@@IntegerDigits[b]}; Transpose[ NestList[nxt,{1,1},90]][[1]] (* Harvey P. Dale, Feb 01 2015 *)

Formula

From Hieronymus Fischer, Jul 01 2007: (Start)
a(n) = a(n-1)+a(n-2)-10*(floor(a(n-1)/10)+floor(a(n-2)/10)). This is valid, since a(n)<100.
a(n) = ds_10(a(n-1))+ds_10(a(n-2))-(floor(a(n-1)/10)+floor(a(n-2)/10)) where ds_10(x) is the digital sum of x in base 10.
a(n) = (a(n-1)mod 10)+(a(n-2)mod 10) = A010879(a(n-1))+A010879(a(n-2)).
a(n) = A131297(n) if A131297(n)<=10.
a(n) = Fib(n)-10*sum{1A000045(n).
a(n) = A000045(n)-10*sum{1A000045(n-k+1)*A059995(a(k))}. (End)

Extensions

More terms from Christopher N. Swanson (cswanson(AT)ashland.edu), Jul 22 2003
Definition adapted to offset by Georg Fischer, Jun 18 2021

A226233 Ten copies of each positive integer.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10
Offset: 1

Views

Author

Sam Vaseghi, Jun 01 2013

Keywords

Comments

Class of well and totally ordered sequences of (p-1)-tuples of natural numbers for p = 11.
Given a prime p the class of sequences a(n,p) can be constructed. The above example is for p=11. The class of well and totally ordered sequences of (prime-1)-tuples of natural numbers contains all sequences a(n) according to FORMULA for primes p. The class is crucial and will be applied to define other sequences, that will be submitted to OEIS as well a posterior.
a(n) = A132272(n-1) for n<=200, but the two sequences start to differ then. - R. J. Mathar, Jun 13 2025

Crossrefs

Cf. A059995 (10 copies of nonnegative integers).

Programs

  • Maple
    A226233 := proc(n)
        option remember ;
        if n <= 10 then
            1;
        elif n <=20 then
            2;
        else
            procname(n-1)+procname(n-10)-procname(n-11) ;
        end if;
    end proc:
    seq(A226233(n),n=1..120) ; # R. J. Mathar, Jun 13 2025
  • Mathematica
    p=11; k = (p - 1); alpha = (k + n - 1 - (Mod[(n - 1), k]))/k; Table[alpha, {n, 100}]
    Table[PadRight[{},10,n],{n,10}]//Flatten (* Harvey P. Dale, May 24 2021 *)
  • PARI
    a(n)=(n+9)\10 \\ Charles R Greathouse IV, Jun 05 2013

Formula

a(n,p) = ((p-1) + n - (1 + ((n-1) mod (p-1))))/(p-1); p is a prime and n positive integer; for this sequence p = 11.
G.f.: x / ( (1+x)*(x^4-x^3+x^2-x+1)*(x^4+x^3+x^2+x+1)*(x-1)^2 ). - R. J. Mathar, Jun 13 2025

A275065 Number of permutations p of [n] such that p(i)-i is a multiple of ten for all i in [n].

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 3072, 9216, 27648, 82944, 248832, 746496, 2239488, 6718464, 20155392, 60466176, 241864704, 967458816, 3869835264, 15479341056, 61917364224, 247669456896, 990677827584, 3962711310336
Offset: 0

Views

Author

Alois P. Heinz, Jul 15 2016

Keywords

Crossrefs

Column k=10 of A275062.

Programs

  • Maple
    f:= n -> mul(floor((n+i)/10)!,i=0..9):
    map(f, [$0..30]); # Robert Israel, Jul 26 2016
  • Mathematica
    Table[Product[Floor[(n + i)/10]!, {i, 0, 9}], {n, 0, 40}] (* Vaclav Kotesovec, Oct 02 2018 *)

Formula

a(n) = Product_{i=0..9} floor((n+i)/10)!.
a(n) = ((m+1)!)^10/(m+1)^(10-k) where m=floor(n/10)=A059995(n) and k=n mod 10 =A010879(n). - Robert Israel, Jul 26 2016
a(n) ~ (2*Pi*n)^(9/2) * n! / 10^(n + 5). - Vaclav Kotesovec, Oct 02 2018

A343609 a(n) = floor(n/9).

Original entry on oeis.org

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

Views

Author

M. F. Hasler, May 19 2021

Keywords

Comments

Also: Nonnegative integers repeated 9 times (with natural offset 0).

Crossrefs

Cf. A004526 ([n/2]), A002264 ([n/3]), A002265 ([n/4]), A002266 ([n/5]), A152467 ([n/6]), A132270 ([(n-1)/7]), A132292 ([(n-1)/8]), A059995 ([n/10]), A344420 ([n/11]), A342696 ([n/12]).
Repunits A002275 = A343609 o A011557.

Programs

  • Maple
    A343609 := n -> iquo(n,9); # illustration: map( A343609, [$0..99] );
  • Mathematica
    A343609[n_] := Floor[n/9]
    a[n_] := Quotient[n, 9]; Array[a, 100, 0] (* Amiram Eldar, May 19 2021 *)
    LinearRecurrence[{1,0,0,0,0,0,0,0,1,-1},{0,0,0,0,0,0,0,0,0,1},100] (* Harvey P. Dale, Mar 01 2025 *)
  • PARI
    apply( A343609(n)=n\9, [0..99])

Formula

a(n) = A002264(A002264(n)).
a(n) = a(n-1) + a(n-9) - a(n-10), n > 9;
G.f.: x^9/(1 - x - x^9 + x^10).

A344420 a(n) = floor(n/11).

Original entry on oeis.org

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

Views

Author

Wesley Ivan Hurt, May 17 2021

Keywords

Comments

Terms agree with A064458 for all n < 121, but a(121) = 11 while A064458(121) = 12.

Crossrefs

Cf. A064458, A059995 (floor n/10).

Programs

  • Mathematica
    Floor[Range[0, 100]/11]
    CoefficientList[Series[x^11/(x^12-x^11-x+1),{x,0,100}],x] (* or *) LinearRecurrence[{1,0,0,0,0,0,0,0,0,0,1,-1},{0,0,0,0,0,0,0,0,0,0,0,1},100] (* Harvey P. Dale, Aug 03 2021 *)

Formula

From Chai Wah Wu, May 18 2021: (Start)
a(n) = a(n-1) + a(n-11) - a(n-12) for n > 11.
G.f.: x^11/(x^12 - x^11 - x + 1). (End)

A359841 Integers Xd which are divisible by X, where d is the last decimal digit.

Original entry on oeis.org

10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 24, 26, 28, 30, 33, 36, 39, 40, 44, 48, 50, 55, 60, 66, 70, 77, 80, 88, 90, 99, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, 270, 280, 290, 300, 310, 320, 330, 340, 350, 360, 370, 380, 390, 400, 410, 420
Offset: 1

Views

Author

Bernard Schott, Jan 15 2023

Keywords

Comments

Integers k such that k is divisible by A059995(k).
This sequence consists of {the thirty-two 2-digit terms of A034837 (from 10 up to 99)} Union {the positive multiples of 10 (A008592\{0})}.

Crossrefs

Cf. A034837, A059995, A178157, A292683 (similar but with dX).
Subsequence: A008592\{0}.

Programs

  • Mathematica
    Select[Range[10, 500], Divisible[#, Floor[#/10]] &] (* Amiram Eldar, Jan 15 2023 *)
  • PARI
    isok(k) = (k>9) && (k % (k \ 10) == 0); \\ Michel Marcus, Jan 20 2023
  • Python
    def ok(n): return n > 9 and n%(n//10) == 0
    print([k for k in range(421) if ok(k)]) # Michael S. Branicky, Jan 15 2023
    
  • Python
    def A359841(n): return (10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 24, 26, 28, 30, 33, 36, 39, 40, 44, 48, 50, 55, 60, 66, 70, 77, 80, 88, 90, 99)[n-1] if n <= 32 else (n-23)*10 # Chai Wah Wu, Jan 20 2023
    
Previous Showing 11-20 of 23 results. Next