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-10 of 12 results. Next

A368062 Numbers k such that k = A257850(k) + A257297(k).

Original entry on oeis.org

0, 36, 655, 1258, 6208, 12508, 45715, 65455, 75385, 125008, 235297, 1250008, 2857144, 3214288, 4210528, 6545455, 6792453, 12500008, 34615386, 47058824, 87671233, 125000008, 654545455, 1250000008, 9529411765, 12500000008, 39130434783, 45714285715, 65454545455, 75384615385
Offset: 1

Views

Author

Nicolas Bělohoubek, Dec 10 2023

Keywords

Examples

			     0 = 0*0   +   0*0;
    36 = 3*6   +   3*6;
   655 = 6*55  +  65*5;
  6208 = 6*208 + 620*8;
  ...
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0,10^6], Part[digits=IntegerDigits[#],1]FromDigits[Drop[digits,1]] + FromDigits[Drop[digits,-1]]Part[digits,Length[digits]] == # &] (* Stefano Spezia, Dec 10 2023 *)
  • PARI
    \\ See links.
  • Python
    def ok(n):
        if n < 10: return n == 0
        s = str(n)
        return n == int(s[0])*int(s[1:]) + (n%10)*(n//10)
    print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Dec 10 2023
    
  • Python
    # faster for generating initial segment of sequence
    from itertools import count, islice
    def agen(): # generator of terms
        yield 0
        for digits in count(2):
            for first in range(1, 10):
                base = first*10**(digits-1)
                for rest in range(10**(digits-1)):
                    n = base + rest
                    if first*rest + (n%10)*(n//10) == n:
                        yield n
                print("...", digits, first, time()-time0, alst)
    print(list(islice(agen(), 18))) # Michael S. Branicky, Dec 10 2023
    

Extensions

a(24)-a(30) from Michael S. Branicky, Dec 10 2023

A142150 The nonnegative integers interleaved with 0's.

Original entry on oeis.org

0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 9, 0, 10, 0, 11, 0, 12, 0, 13, 0, 14, 0, 15, 0, 16, 0, 17, 0, 18, 0, 19, 0, 20, 0, 21, 0, 22, 0, 23, 0, 24, 0, 25, 0, 26, 0, 27, 0, 28, 0, 29, 0, 30, 0, 31, 0, 32, 0, 33, 0, 34, 0, 35, 0, 36, 0, 37, 0, 38, 0, 39, 0, 40, 0, 41, 0, 42, 0, 43, 0
Offset: 0

Views

Author

Reinhard Zumkeller, Jul 15 2008

Keywords

Comments

Number of vertical pairs in a wheel with n equal sections. - Wesley Ivan Hurt, Jan 22 2012
Number of even terms of n-th row in the triangles A162610 and A209297. - Reinhard Zumkeller, Jan 19 2013
Also the result of writing n-1 in base 2 and multiplying the last digit with the number with its last digit removed. See A115273 and A257844-A257850 for generalization to other bases. - M. F. Hasler, May 10 2015
Also follows the rule: a(n+1) is the number of terms that are identical with a(n) for a(0..n-1). - Marc Morgenegg, Jul 08 2019

Crossrefs

Programs

Formula

a(n) = XOR{k AND (n-k): 0<=k<=n}.
a(n) = (n/2)*0^(n mod 2); a(2*n)=n and a(2*n+1)=0.
a(n) = floor(n^2/2) mod n. - Enrique Pérez Herrero, Jul 29 2009
a(n) = A027656(n-2). - Reinhard Zumkeller, Nov 05 2009
a(n) = Sum_{k=0..n} (k mod 2)*((n-k) mod 2). - Reinhard Zumkeller, Nov 05 2009
a(n+1) = A000217(n) mod A000027(n+1) = A000217(n) mod A001477(n+1). - Edgar Almeida Ribeiro (edgar.a.ribeiro(AT)gmail.com), May 19 2010
From Bruno Berselli, Oct 19 2010: (Start)
a(n) = n*(1+(-1)^n)/4.
G.f.: x^2/(1-x^2)^2.
a(n) = 2*a(n-2)-a(n-4) for n > 3.
Sum_{i=0..n} a(i) = (2*n*(n+1)+(2*n+1)*(-1)^n-1)/16 (see A008805). (End)
a(n) = -a(-n) = A195034(n-1)-A195034(-n-1). - Bruno Berselli, Oct 12 2011
a(n) = A000326(n) - A191967(n). - Reinhard Zumkeller, Jul 07 2012
a(n) = Sum_{i=1..n} floor((2*i-n)/2). - Wesley Ivan Hurt, Aug 21 2014
a(n-1) = floor(n/2)*(n mod 2), where (n mod 2) is the parity of n, or remainder of division by 2. - M. F. Hasler, May 10 2015
a(n) = A158416(n) - 1. - Filip Zaludek, Oct 30 2016
E.g.f.: x*sinh(x)/2. - Ilya Gutkovskiy, Oct 30 2016
a(n) = A000007(a(n-1)) + a(n-2) for n > 1. - Nicolas Bělohoubek, Oct 06 2024

A115273 a(n) = floor(n/3)*(n mod 3).

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 0, 2, 4, 0, 3, 6, 0, 4, 8, 0, 5, 10, 0, 6, 12, 0, 7, 14, 0, 8, 16, 0, 9, 18, 0, 10, 20, 0, 11, 22, 0, 12, 24, 0, 13, 26, 0, 14, 28, 0, 15, 30, 0, 16, 32, 0, 17, 34, 0, 18, 36, 0, 19, 38, 0, 20, 40, 0, 21, 42, 0, 22, 44, 0, 23, 46, 0, 24, 48, 0, 25, 50, 0, 26, 52, 0, 27, 54, 0, 28, 56
Offset: 0

Views

Author

Zak Seidov, Jan 18 2006

Keywords

Comments

Three arithmetic progressions interlaced: a(1)=1,2,0 and d=a(n+1)-a(n)=1,2,0. Cf. A115274(n) = n+a(n), n=1,2,3,...

Crossrefs

Cf. A115274.
Cf. A142150 (the base 2 analog), A257844, ..., A257850.

Programs

  • Magma
    [Floor(n/3)*(n mod 3): n in [0..100]]; // Vincenzo Librandi, May 11 2015
    
  • Mathematica
    Table[Floor[n/3]*Mod[n, 3], {n, 0, 86}] (* Extended to offset 0 by M. F. Hasler, May 11 2015 *)
  • PARI
    a(n, b=3)=(n=divrem(n, b))[1]*n[2] \\ M. F. Hasler, May 10 2015
    
  • Python
    from math import prod
    def A115273(n): return prod(divmod(n,3)) # Chai Wah Wu, Jan 19 2023

Formula

a(3*k+1) = k, a(3*k+2) = 2*k, a(3*k+3) = 0, k >= 1.
G.f.: x^4*(2*x+1) / ((x-1)^2*(x^2+x+1)^2). - Colin Barker, May 11 2015

Extensions

a(0)-a(3) and cross-references added by M. F. Hasler, May 11 2015

A257844 a(n) = floor(n/4) * (n mod 4).

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 2, 3, 0, 2, 4, 6, 0, 3, 6, 9, 0, 4, 8, 12, 0, 5, 10, 15, 0, 6, 12, 18, 0, 7, 14, 21, 0, 8, 16, 24, 0, 9, 18, 27, 0, 10, 20, 30, 0, 11, 22, 33, 0, 12, 24, 36, 0, 13, 26, 39, 0, 14, 28, 42, 0, 15, 30, 45, 0, 16, 32, 48, 0, 17, 34, 51, 0, 18, 36
Offset: 0

Views

Author

M. F. Hasler, May 10 2015

Keywords

Comments

Equivalently, write n in base 4, multiply the last digit by the number with its last digit removed.

Crossrefs

Cf. A142150 (the base-2 analog), A115273, A257845 - A257850.

Programs

  • Magma
    [Floor(n/4)*(n mod 4) : n in [0..100]]; // Wesley Ivan Hurt, Jun 22 2015
    
  • Magma
    I:=[0,0,0,0,0,1,2,3]; [n le 8 select I[n] else 2*Self(n-4)-Self(n-8): n in [1..100]]; // Vincenzo Librandi, Jun 23 2015
    
  • Maple
    A257844:=n->floor(n/4)*(n mod 4): seq(A257844(n), n=0..100); # Wesley Ivan Hurt, Jun 22 2015
  • Mathematica
    Table[Floor[n/4] Mod[n, 4], {n, 0, 100}] (* Wesley Ivan Hurt, Jun 22 2015 *)
  • PARI
    a(n,b=4)=(n=divrem(n,b))[1]*n[2]
    
  • PARI
    concat([0,0,0,0,0], Vec(x^5*(3*x^2+2*x+1) / ((x-1)^2*(x+1)^2*(x^2+1)^2) + O(x^100))) \\ Colin Barker, May 11 2015
    
  • Python
    def A257844(n): return (n>>2)*(n&3) # Chai Wah Wu, Jan 27 2023

Formula

a(n) = 2*a(n-4) - a(n-8), n > 8. - Colin Barker, May 11 2015
G.f.: x^5*(3*x^2+2*x+1) / ((x-1)^2*(x+1)^2*(x^2+1)^2). - Colin Barker, May 11 2015
a(n) = (3 - 2*(-1)^((2*n - 1 + (-1)^n)/4) - (-1)^n)*(2*n - 3 + 2*(-1)^((2*n - 1 + (-1)^n)/4) + (-1)^n)/16. - Wesley Ivan Hurt, Jun 22 2015

A088117 Let the decimal expansion of n be abcd...; then a(n) = (a*bcd... + b*acd... + c*abd... + d*abc... + ...) + (ab*cd... + bc*ad... + cd*ab... + ...) + ... . That is, a(n) = sum over all the digit strings of the product (number obtained by deleting a digit string) * (deleted digit string).

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, 2, 4, 6, 8, 10, 12, 14, 16, 18, 0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 0, 7, 14, 21, 28, 35, 42, 49, 56, 63, 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 0, 9, 18, 27, 36, 45, 54, 63, 72, 81, 0, 11
Offset: 0

Views

Author

Amarnath Murthy, Sep 25 2003

Keywords

Comments

Each substring is used in only product.
a(n) = 0 for 0 <= n <= 10.

Examples

			a(1234) = (1*234 + 2*134 + 3*124 + 4*123) + (12*34 + 23*14) = 2096.
a(12345) = (1*2345 + 2*1345 + 3*1245 + 4*1235 + 5*1234) + (12*345 + 15*234 + 23*145 + 34*125 + 45*123) = 40650.
		

Crossrefs

Different from A035930, A171765, A257850.

Programs

  • Maple
    a:= n-> (s-> add(add(parse(s[i..j])*parse(cat(s[1..i-1],
        s[j+1..length(s)])), i=1..j), j=1..length(s)-1))(""||n):
    seq(a(n), n=0..120);  # Alois P. Heinz, May 22 2021

Extensions

Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, Jul 14 2007
a(0)=0 inserted and examples corrected by Alois P. Heinz, May 22 2021

A257297 a(n) = (initial digit of n) * (n with initial digit removed).

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, 2, 4, 6, 8, 10, 12, 14, 16, 18, 0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 0, 7, 14, 21, 28, 35, 42, 49, 56, 63, 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 0, 9, 18, 27, 36, 45, 54, 63, 72, 81, 0, 1, 2, 3
Offset: 0

Views

Author

M. F. Hasler, May 10 2015

Keywords

Comments

The initial 100 terms match those of A035930 (maximal product of any two numbers whose concatenation is n) and also those of A171765 (product of digits of n, or 0 for n<10), and except for initial terms, also A007954 (product of decimal digits of n) and A115300 (greatest digit of n * least digit of n).
Iterations of this map always end in 0, since a(n) < n. Sequence A257299 lists numbers for which these iterations reach 0 in exactly 9 steps, with the additional constraint of having each time a different initial digit.
If "initial" is replaced by "last" in the definition (A257850), then we get the same values up to a(100), but (10, 20, 30, ...) for n = 101, 102, 103, ..., again different from each of the 4 other sequences mentioned in the first comment. - M. F. Hasler, Sep 01 2021

Examples

			For n<10, a(n) = n*0 = 0, since removing the initial and only digit leaves nothing, i.e., zero (by convention).
a(10) = 1*0 = 0, a(12) = 1*2 = 2, ..., a(20) = 2*0 = 0, a(21) = 2*1 = 2, a(22) = 2*2 = 4, ...
a(99) = 9*9 = 81, a(100) = 1*00 = 0, a(101) = 1*01 = 1, ..., a(123) = 1*23, ...
		

Crossrefs

Programs

  • Maple
    a:= n-> `if`(n<10, 0, (s-> parse(s[1])*parse(s[2..-1]))(""||n)):
    seq(a(n), n=0..120);  # Alois P. Heinz, Feb 12 2024
  • Mathematica
    Table[Times@@FromDigits/@TakeDrop[IntegerDigits@n,1],{n,0,103}] (* Giorgos Kalogeropoulos, Sep 03 2021 *)
  • PARI
    apply( {A257297(n)=vecprod(divrem(n,10^logint(n+!n,10)))}, [0..111]) \\ Edited by M. F. Hasler, Sep 01 2021
    
  • Python
    def a(n): s = str(n); return 0 if len(s) < 2 else int(s[0])*int(s[1:])
    print([a(n) for n in range(104)]) # Michael S. Branicky, Sep 01 2021

Formula

For 1 <= m <= 9 and n < 10^k, a(m*10^k + n) = m*n.

Extensions

a(101..103) corrected by M. F. Hasler, Sep 01 2021

A330633 The concatenation of the products of every pair of consecutive digits of n (with a(n) = 0 for 0 <= n <= 9).

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, 2, 4, 6, 8, 10, 12, 14, 16, 18, 0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 0, 7, 14, 21, 28, 35, 42, 49, 56, 63, 0
Offset: 0

Views

Author

Scott R. Shannon, Dec 21 2019

Keywords

Comments

If the decimal expansion of n is d_1 d_2 ... d_k then a(n) is the number formed by concatenating the decimal numbers d_1*d_2, d_2*d_3, ..., d_{k-1}*d_k.
Due to the fact that for two digit numbers the sequence is simply the multiplication of those two numbers, this sequence matches numerous others for the first 100 terms. See the sequences in the cross references. The terms begin to differ beyond n = 100.

Crossrefs

Programs

  • Maple
    read("transforms") :
    A330633 := proc(n)
        local dgs,L,i ;
        if n <=9 then
            0;
        else
            dgs := ListTools[Reverse](convert(n,base,10)) ;
            L := [] ;
            for i from 2 to nops(dgs) do
                L := [op(L), op(i-1,dgs)*op(i,dgs)] ;
            end do:
            digcatL(L) ;
        end if;
    end proc: # R. J. Mathar, Jan 11 2020
  • Mathematica
    Array[If[Or[# == 0, IntegerLength@ # == 1], 0, FromDigits[Join @@ IntegerDigits[Times @@ # & /@ Partition[IntegerDigits@ #, 2, 1]]]] &, 81, 0] (* Michael De Vlieger, Dec 23 2019 *)
  • PARI
    a(n) = my(d=digits(n), s="0"); for (k=1, #d-1, s=concat(s, d[k]*d[k+1])); eval(s); \\ Michel Marcus, Apr 28 2020

Formula

a(10) = 0 as 1 * 0 = 0.
a(29) = 18 as 2 * 9 = 18.
a(100) = 0 as 1 * 0 = 0 and 0 = 0 = 0, and '00' is reduced to 0.
a(110) = 10 as 1 * 1 = 1 and 1 * 0 = 0. This is the first term that differs from A007954 and A171765, the multiplication of all digits of n.

A257845 a(n) = floor(n/5) * (n mod 5).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 0, 2, 4, 6, 8, 0, 3, 6, 9, 12, 0, 4, 8, 12, 16, 0, 5, 10, 15, 20, 0, 6, 12, 18, 24, 0, 7, 14, 21, 28, 0, 8, 16, 24, 32, 0, 9, 18, 27, 36, 0, 10, 20, 30, 40, 0, 11, 22, 33, 44, 0, 12, 24, 36, 48, 0, 13, 26, 39, 52, 0, 14, 28, 42, 56
Offset: 0

Views

Author

M. F. Hasler, May 10 2015

Keywords

Comments

Equivalently, write n in base 5, multiply the last digit by the number with its last digit removed.

Crossrefs

Cf. A142150 (the base 2 analog), A115273, A257844 - A257850.

Programs

  • Mathematica
    LinearRecurrence[{0,0,0,0,2,0,0,0,0,-1},{0,0,0,0,0,0,1,2,3,4},80] (* Harvey P. Dale, Aug 15 2021 *)
  • PARI
    a(n,b=5)=(n=divrem(n,b))[1]*n[2]
    
  • PARI
    concat([0,0,0,0,0,0], Vec(x^6*(4*x^3+3*x^2+2*x+1) / ((x-1)^2*(x^4+x^3+x^2+x+1)^2) + O(x^100))) \\ Colin Barker, May 11 2015

Formula

a(n) = 2*a(n-5)-a(n-10). - Colin Barker, May 11 2015
G.f.: x^6*(4*x^3+3*x^2+2*x+1) / ((x-1)^2*(x^4+x^3+x^2+x+1)^2). - Colin Barker, May 11 2015

A257849 a(n) = floor(n/9) * (n mod 9).

Original entry on oeis.org

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

Views

Author

M. F. Hasler, May 10 2015

Keywords

Comments

Equivalently, write n in base 9, multiply the last digit by the number with its last digit removed.
See A142150(n-1) for the base 2 analog, and A115273, A257844 - A257850 for the base 3 - base 10 variants.

Crossrefs

Cf. A142150 (the base 2 analog), A115273, A257844 - A257850.

Programs

  • Magma
    [Floor(n/9)*(n mod 9): n in [0..100]]; // Vincenzo Librandi, May 11 2015
    
  • Mathematica
    Table[Floor[n/9] Mod[n, 9], {n, 100}] (* Vincenzo Librandi, May 11 2015 *)
  • PARI
    A257849(n)=n\9*(n%9)
    
  • PARI
    concat([0,0,0,0,0,0,0,0,0,0], Vec(x^10*(8*x^7+7*x^6+6*x^5+5*x^4+4*x^3+3*x^2+2*x+1) / ((x-1)^2*(x^2+x+1)^2*(x^6+x^3+1)^2) + O(x^100))) \\ Colin Barker, May 11 2015
    
  • Python
    from math import prod
    def A257849(n): return prod(divmod(n,9)) # Chai Wah Wu, Jan 19 2023
  • Sage
    [floor(n/9)*(n % 9)  for n in (0..80)]; # Bruno Berselli, May 11 2015
    

Formula

a(n) = 2*a(n-9)-a(n-18). - Colin Barker, May 11 2015
G.f.: x^10*(8*x^7+7*x^6+6*x^5+5*x^4+4*x^3+3*x^2+2*x+1) / ((x-1)^2*(x^2+x+1)^2*(x^6+x^3+1)^2). - Colin Barker, May 11 2015

A257846 a(n) = floor(n/6) * (n mod 6).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 0, 2, 4, 6, 8, 10, 0, 3, 6, 9, 12, 15, 0, 4, 8, 12, 16, 20, 0, 5, 10, 15, 20, 25, 0, 6, 12, 18, 24, 30, 0, 7, 14, 21, 28, 35, 0, 8, 16, 24, 32, 40, 0, 9, 18, 27, 36, 45, 0, 10, 20, 30, 40, 50, 0, 11, 22, 33, 44, 55, 0, 12, 24
Offset: 0

Views

Author

M. F. Hasler, May 10 2015

Keywords

Comments

Equivalently, write n in base 6, multiply the last digit by the number with its last digit removed.

Crossrefs

Cf. A142150 (the base 2 analog), A115273, A257844 - A257850.

Programs

  • Mathematica
    Table[Floor[n/6]*Mod[n, 6], {n, 120}] (* Michael De Vlieger, May 11 2015 *)
  • PARI
    a(n,b=6)=(n=divrem(n,b))[1]*n[2]
    
  • PARI
    concat([0, 0, 0, 0, 0, 0, 0], Vec(x^7*(5*x^4+4*x^3+3*x^2+2*x+1) / ((x-1)^2*(x+1)^2*(x^2-x+1)^2*(x^2+x+1)^2) + O(x^100))) \\ Colin Barker, May 11 2015

Formula

a(n) = 2*a(n-6)-a(n-12). - Colin Barker, May 11 2015
G.f.: x^7*(5*x^4+4*x^3+3*x^2+2*x+1) / ((x-1)^2*(x+1)^2*(x^2-x+1)^2*(x^2+x+1)^2). - Colin Barker, May 11 2015
Showing 1-10 of 12 results. Next