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

A080463 Sum of the two numbers formed by alternate digits of n.

Original entry on oeis.org

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

Views

Author

Amarnath Murthy, Mar 02 2003

Keywords

Comments

First 99 terms match with those of A007953.
They also match A209685. - M. F. Hasler, Jan 10 2016

Examples

			a(132546) = 124 + 356 = 480.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) option remember; n mod 10 + (floor(n/10) mod 10) + 10*procname(floor(n/100)) end proc:
    f(0):= 0:
    seq(f(n),n=0..1000); # Robert Israel, Jan 10 2016
  • PARI
    A080463(n)=abs(vector(#n=digits(n),j,10^((#n-j)\2))*n~) \\ M. F. Hasler, Jan 10 2016

Formula

From Robert Israel, Jan 10 2016: (Start)
f(n) = n mod 10 + floor(n/10) mod 10 + 10*f(floor(n/100)).
G.f. G(x) satisfies G(x) = (x + 2x^2 + ... + 9x^9)/(1-x^10) + (x^10 + 2 x^20 + ... + 9 x^90)/((1-x)(1+x^10+...+x^90) + 10 (1 + x + ... + x^99) G(x^10).
(End)

Extensions

More terms from Ray Chandler, Oct 11 2003
Extended to offset 0 and b-file by M. F. Hasler, Jan 10 2016

A080465 Absolute difference between the two numbers formed by alternate digits of n.

Original entry on oeis.org

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

Views

Author

Amarnath Murthy, Mar 02 2003

Keywords

Comments

Differs from A040115 first at a(110) = 9. - R. J. Mathar, Sep 19 2008

Examples

			a(132546) = |124 - 356| = 232.
		

Crossrefs

See also A040997.

Programs

  • PARI
    A080465(n)=abs(vector(#n=digits(n),j,(-1)^j*10^((#n-j)\2))*n~) \\ M. F. Hasler, Jan 10 2016

Extensions

More terms from Ray Chandler, Oct 11 2003

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

A267086 Numbers such that the number formed by digits in even positions divides, or is divisible by, the number formed by the digits in odd positions; zero allowed.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 24, 26, 28, 30, 31, 33, 36, 39, 40, 41, 42, 44, 48, 50, 51, 55, 60, 61, 62, 63, 66, 70, 71, 77, 80, 81, 82, 84, 88, 90, 91, 93, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 122, 124, 126, 128, 132, 135
Offset: 1

Views

Author

M. F. Hasler, Jan 10 2016

Keywords

Comments

The initial 0 is included by convention. The single-digit numbers are included with the reasoning that the number formed by digits in even positions is zero, and thus divisible by (= a multiple of) any other number, and here in particular the number formed by first digit.
By "digits in odd positions" we mean the first (most significant), third, fifth, etc. digits; e.g., for the numbers 12345 or 123456 this would be 135.
An extended version of Eric Angelini's "integears" A267085.
Sequence A263314 is a subsequence up to 120, but 121 is in A263314 and not in this sequence.

Examples

			12 is in the sequence because 1 divides 2.
213 is in the sequence because 1 divides 23.
1020 is in the sequence because 12 divides 00 = 0. (Any number divides 0 therefore any number which has every other digit equal to zero is in the sequence.)
		

Crossrefs

See also A080463, A080464 and A080465.

Programs

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.

A267085 Numbers such that the number formed by digits in even position divides, or is divisible by, the number formed by the digits in odd position; both must be nonzero.

Original entry on oeis.org

11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 24, 26, 28, 31, 33, 36, 39, 41, 42, 44, 48, 51, 55, 61, 62, 63, 66, 71, 77, 81, 82, 84, 88, 91, 93, 99, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 122, 124, 126, 128, 132, 135, 138, 142, 146, 150, 155, 162, 168, 174, 186, 198
Offset: 1

Views

Author

Eric Angelini and M. F. Hasler, Jan 10 2016

Keywords

Comments

Termed "integears" by Eric Angelini. See A267086 for the "extended version" where zero is allowed.

Crossrefs

See also A080463, A080464 and A080465.

Programs

  • Mathematica
    Select[Range[10, 200], Or[If[#2 == 0, False, Mod[#1, #2] == 0], If[#2 == 0, False, Mod[#2, #1] == 0]] & @@ {FromDigits@ Extract[#, Range[1, Length@ #, 2] /. x_Integer -> {x}], FromDigits@ Extract[#, Range[2, Length@#, 2] /. x_Integer -> {x}]} &@ IntegerDigits@ # &] (* Michael De Vlieger, Jan 21 2016 *)
  • PARI
    is(n,d=digits(n))={n=d*matrix(#d,2,z,s,if(z==Mod(s,2),10^((#d-z)\2))); n[2] && (n[1]%n[2]==0 || n[2]%n[1]==0)}
Showing 1-6 of 6 results.