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 21 results. Next

A347520 A053392 with duplicates removed.

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, 21, 22, 23, 24, 25, 26, 27, 28, 29, 210, 32, 33, 34, 35, 36, 37, 38, 39, 310, 311, 43, 44, 45, 46, 47, 48, 49, 410, 411, 412, 54, 55, 56, 57, 58, 59
Offset: 0

Views

Author

Stefan Steinerberger, Sep 04 2021

Keywords

Crossrefs

Cf. A053392.

Programs

  • Mathematica
    a[n_] := Total /@ Transpose[{Most[id = IntegerDigits[n]], Rest[id]}] //
         IntegerDigits // Flatten // FromDigits; DeleteDuplicates[Table[a[n], {n, 0, 1000}]]
  • Python
    # uses A053392
    from collections import OrderedDict
    def afiltern(terms):
        return list(OrderedDict.fromkeys(A053392(k) for k in range(terms)))
    print(afiltern(179)) # Michael S. Branicky, Sep 04 2021

A328142 Elements of cycles for iterations of A329623: n -> |n - concat(sum of adjacent digits of n)|.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 182, 273, 364, 455, 546, 637, 728, 1728, 2637, 3546, 4455, 5364, 6273, 7182, 17182, 26273, 35364, 44455, 53546, 62637, 71728, 171728, 262637, 353546, 444455, 535364, 626273, 717182, 1717182, 2626273, 3535364, 4444455, 5353546, 6262637, 7171728
Offset: 1

Views

Author

M. F. Hasler, Dec 02 2019

Keywords

Comments

Equivalently: range of A328865 \ {-1}.
By a k-cycle (or cycle of length k) of A329623 we mean a vector (x_1, ..., x_k) such that A329623(x_i) = x_{i+1} for i < k, and A329623(x_k) = x_1. We include here the cycles of length k = 1 which are the fixed points of A329623, viz A329623(x_1) = x_1. No cycle with k > 2 is known.
There are 7 infinite subsequences: for initial digit 1 <= d <= 7, alternate digit d and 8-d to form an undulating (A033619) number of arbitrary length L >= 3, then add 11.
The terms with initial digit d > 4 are the larger member of a 2-cycle having a term with d < 4 as smaller member. The terms with d = 4 (and those <= 9) are fixed points. So far no other fixed points or other cycles are known. As far as this remains valid, the terms of this sequence are characterized by A329623(A329623(x)) = x.
Sequence A328279 lists the smallest member of each cycle.

Examples

			The single-digit numbers 1, ..., 9 and the numbers f(k) = 4*(10^k-1)/9 + 11, k >= 3, are fixed points of A329623.
Indeed, for f(k) = 4...455 we have A053392(f(k)) = 8...910 = 2*f(k), so A329623(f(k)) = 2*f(k) - f(k) = f(k).
For a(10) = 182, we have A329623(182) = 728 and A329623(728) = 182, so these are members of the 2-cycle (182, 728).
For a(11) = 273, we have A329623(273) = 637 and A329623(637) = 273, so these are members of the 2-cycle (273, 637).
Similarly for all subsequent terms except the f(k) of the form 4...455.
		

Crossrefs

Cf. A329623, A053392 (concatenate sums of adjacent digits of n), A328865, A329624.
See A328279 for the smallest representative of each cycle.

Programs

  • PARI
    apply( {A328142(n)=if(n>9,fromdigits(vector((n+8)\/7,i,n=if(i>1, 8-n,(n+4)%7+1)))+11,n)}, [1..40]) \\ As far as there are no other terms than those described in COMMENTS. - M. F. Hasler, Dec 06 2019, replacing earlier code.

A328865 The first repeating term in the trajectory of n under iterations of A329623, or -1 if no such terms exists.

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, Nov 24 2019

Keywords

Comments

A329623(n) = |n - A053392(n)|, where A053392 is the concatenation of the sums of pairs of consecutive digits.
This is the first number which appears twice for the iteration of A329623 starting with n. See A329624 for an explanation of the sequence, and for the number of iterations required before reaching this value. Terms a(9) to a(127) are all 9's, after which the sequence shows large jumps in value, e.g., a(1673) = 62626262626262626262626262637.
All -1 are so far conjectural, see A329624 and A329917 for more information.
The terms > 0 of this sequence are elements of cycles for A329623. Only 2-cycles and fixed points 1, 2, ..., 9 and 4...455 are known. Therefore a(n) is the earliest A329623^{k}(n) = A329623^{k+2}(n) if such k exist. See A328142 for the list of all possible values and more precise definitions. - M. F. Hasler, Dec 06 2019
The first escape value is a(1373) = -1. - Georg Fischer, Jul 16 2020

Examples

			a(10) = 9 as A329623(10) = 9, and A329623(9) = 9, thus 9 is the first repeating value.
a(128) = 182, as A329623(128) = 182, A329623(182) = 728, A329623(728) = 182, thus 182 is the first repeating value.
a(210) = 637, as A329623(210) = 179, A329623(179) = 637, A329623(637) = 273, A329623(273) = 637, thus 637 is the first repeating value.
		

Crossrefs

Programs

Extensions

Incorrect comment, link and program deleted following an observation by Scott R. Shannon, Nov 27 2019

A334387 The difference version of the 'Decade transform' : to obtain a(n) write n as a sum of its power-of-ten parts and then continue to calculate the absolute value of the difference between the adjacent parts until a single number remains.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 70, 69, 68
Offset: 0

Views

Author

Scott R. Shannon, Apr 26 2020

Keywords

Comments

To obtain the difference version of the 'Decade transform' of n first write n as a sum of its power-of-ten parts and then continue to calculate the absolute value of the difference between the adjacent parts until a single number remains. See the Examples for details.
See A330859 for the additive version of the same transform.

Examples

			Let n = 32871. Write n as a sum of its power-of-ten parts:
32871 = 30000+2000+800+70+1
Now take the absolute value of the difference between the adjacent numbers in this sum:
30000+2000+800+70+1 -> (|30000-2000|):(|2000-800|):(|800-70|):(|70-1|) = 28000:1200:730:69
Now repeat this until a single number remains:
28000:1200:730:69 -> 26800:470:661
26800:470:661 -> 26330:191
26330:191 -> 26139
Thus a(32871) = 26139.
Other examples:
a(11) = 9 as 11 = 10+1 thus 10:1 -> 9.
a(19) = 1 as 19 = 10+9 thus 10:9 -> 1.
a(20) = 20 as 20 = 20+0 thus 20:0 -> 20.
a(67) = 53 as 67 = 60+7 thus 60:7 -> 53.
a(1234) = 486 as 1234 = 1000+200+30+4 thus 1000:200:30:4 -> 800:170:26 -> 630:144 -> 486.
a(15010) = 0 as 15010 = 10000+5000+0+10+0 thus 10000:5000:0:10:0 -> 5000:5000:10:10 -> 0:4990:0 -> 4990:4990 -> 0.
		

Crossrefs

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.

A330653 The prime numbers whose digit sum, adjacent digit sum concatenation, and adjacent digit difference concatenation are also primes.

Original entry on oeis.org

29, 41, 47, 61, 83, 101, 263, 281, 401, 463, 601, 607, 661, 809, 821, 863, 1129, 1303, 2063, 2267, 3121, 3181, 3301, 3343, 4001, 4603, 5309, 5581, 6007, 6043, 6803, 6863, 7129, 7309, 8009, 8681, 8821, 9721, 9967, 10903, 10909, 14143, 16903, 17209, 18521, 19421, 20063, 20201, 20407, 20807, 21143, 24281, 25147
Offset: 1

Views

Author

Scott R. Shannon, Dec 22 2019

Keywords

Comments

This sequence lists the prime numbers whose digit sum A007953, concatenation of adjacent digit sums A053392, and concatenation of adjacent digit differences A040115, are also primes. Due to the digit sum being prime this is a subsequence of A046704.
For primes up to ten million there are 2268 entries, which is about one prime in every 293. The largest digit sum is 53 for a(1482) = 5986889, the largest adjacent digit sum concatenation is 171818141113 for a(2076) = 8999567, and the largest adjacent digit difference concatenation is 993247 for a(2099) = 9096481.

Examples

			a(1) = 29, as 2 + 9 = 11, '2 + 9' = 11, '|2 - 9|' = 7, and 29, 11, 7 are all prime.
a(7) = 263, as 2 + 6 + 3 = 11, '2 + 6' + '6 + 3' = 89, '|2 - 6|' + '|6 - 3|' = 43, and 263, 11, 89, 43 are all prime.
a(25) = 4001, as 4 + 0 + 0 + 1 = 5, '4 + 0' + '0 + 0' + '0 + 1' = 401, '|4 - 0|' + '|0 - 0|' + '|0 - 1|' = 401, and 4001, 5, 401 are all prime.
		

Crossrefs

A328279 Smallest elements of the cycles of (iterations of) A329623: n -> |concat(sum of adjacent digits of n) - n|.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 182, 273, 364, 455, 1728, 2637, 3546, 4455, 17182, 26273, 35364, 44455, 171728, 262637, 353546, 444455, 1717182, 2626273, 3535364, 4444455, 17171728, 26262637, 35353546, 44444455, 171717182, 262626273, 353535364, 444444455, 1717171728, 2626262637, 3535353546
Offset: 1

Views

Author

M. F. Hasler, Dec 02 2019

Keywords

Comments

By a k-cycle (or: cycle of length k) of A329623 we mean a vector (x_1, ..., x_k) such that A329623(x_i) = x_{i+1} for i < k, and A329623(x_k) = x_1. We include here the cycles of length k = 1 which are the fixed points of A329623, viz: A329623(x_1) = x_1.
Differs from A328142 = range of A328865 \ {-1} in that only the smallest element of a cycle is listed here.
Infinite subsequences include: 1{71}*82, 2{62}*73, 3{53}*64, 4+55, {17}+28, {26}+37 and {35}+46, where "*" (resp. "+") means 0 (resp. 1) or more occurrences. As long as there are no other terms, we have a simple formula for a(n), cf. PARI code.
So far the known fixed points of A329623 are the single-digit numbers and numbers of the form 4...455: {4*(10^k-1)/9 + 11; k >= 3}. All other known terms of this sequence and A328142 are part of 2-cycles, i.e., A329623(A329623(a(n))) = a(n) for all n. No other cycles are known so far.

Examples

			The single-digit numbers 1, ..., 9 as well as numbers f(k) = 4*(10^k-1)/9 + 11, k >= 3, are fixed points of A329623.
Indeed, A053392(f(k)) = A053392(4...455) = 8...8910 = 8*(10^k-1)/9 + 22 = 2*f(k), and therefore A329623(f(k)) = A053392(f(k)) - f(k) = f(k).
For a(10) = 182, we have A329623(182) = 728 and A329623(728) = 182, so this is the smallest member of the 2-cycle (182, 728).
For a(11) = 273, we have A329623(273) = 637 and A329623(637) = 273, so this is the smallest member of the 2-cycle (273, 637).
Similarly for all subsequent terms except the f(k) of the form 4...455.
		

Crossrefs

Cf. A328142, A329623, A053392 (concatenate sums of adjacent digits of n), A328865.

Programs

  • PARI
    is_A328279(n)={n==vecmin(vector(9,i,n=A329623(n)))}
    
  • PARI
    apply( A328279(n)={if(n<10,n, bittest((n=divrem(n-10,4)+[1,2]~)[1],0), (n[2]*9-1)*10^(n[1]-1)\99*1000+n[2]*91, (-1+n[2]*=9)*10^n[1]\99*100+10+n[2])}, [1..40]) \\ Valid as long as there is no other term > 9 than those of the 7 infinite subfamilies mentioned in the comment.

Formula

Conjectures from Colin Barker, Dec 05 2019: (Start)
G.f.: x*(1 + x + x^2 + x^3 - 8*x^4 - 8*x^5 - 8*x^6 - 8*x^7 - 18*x^8 + 154*x^9 + 72*x^10 + 72*x^11 + 72*x^12 - 294*x^13 + 80*x^14 + 80*x^15 + 80*x^16 - 460*x^17) / ((1 - x)*(1 + x^4)*(1 - 10*x^4)).
a(n) = a(n-1) + 9*a(n-4) - 9*a(n-5) + 10*a(n-8) - 10*a(n-9) for n>17.
(End)

A330859 The additive version of the 'Decade transform' : to obtain a(n) write n as a sum of its power-of-ten parts and then continue to calculate the sum of the adjacent parts until a single number remains.

Original entry on oeis.org

100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 220, 221, 222
Offset: 100

Views

Author

Scott R. Shannon, Apr 28 2020

Keywords

Comments

Due to its construction a(n) = n for n=0..109, thus the data section shows a(n) for n >= 100.
To obtain the additive version of the 'Decade transform' of n first write n as a sum of its power-of-ten parts and then continue to calculate the sum of the adjacent parts until a single number remains. See the Examples for details.
See A334387 for the difference version of the same transform.

Examples

			Let n = 32871. Write n as a sum of its power-of-ten parts:
32871 = 30000+2000+800+70+1
Now take the sum of adjacent numbers in this sum:
30000+2000+800+70+1 -> (30000+2000):(2000+800):(800+70):(70+1) = 32000:2800:870:71
Now repeat this until a single number remains:
32000:2800:870:71 -> 34800:3670:941
34800:3670:941 -> 38470:4611
38470:4611 -> 43081
Thus a(32871) = 43081.
Other examples:
a(100) = 100 as 100 = 100+0+0 thus 100:0:0 -> 100:0 -> 100. The equality a(n) = n holds for n=0 to 109.
a(110) = 120 as 110 = 100+10+0 thus 100:10:0 -> 110:10 -> 120.
a(1234) = 1694 as 1234 = 1000+200+30+4 thus 1000:200:30:4 -> 1200:230:34 -> 1430:264 -> 1694.
a(15010) = 30040 as 15010 = 10000+5000+0+10+0 thus 10000:5000:0:10:0 -> 15000:5000:10:10 -> 20000:5010:20 -> 25010:5030 -> 30040.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Block[{d = IntegerDigits[n], m}, m = Length[d] - 1; Total[d Binomial[ m, Range[0, m]] 10^Range[m, 0, -1]]]; a /@ Range[100, 162] (* Giovanni Resta, May 09 2020 *)

Formula

Let d_m,d_(m-1),..,d_1,d_0 be the m decimal digits of n, then a(n) = Sum_{k=0..m} d_k*C(m,k)*10^k. - Giovanni Resta, May 09 2020

A331031 The prime numbers that are prime-indexed primes and whose digit sum, adjacent digit sum concatenation, and adjacent digit difference concatenation are also primes.

Original entry on oeis.org

41, 83, 401, 2063, 6863, 10909, 20063, 26489, 44621, 105229, 187067, 205507, 233267, 238547, 240047, 243301, 256307, 346763, 367021, 376003, 395581, 555707, 562181, 563467, 600203, 613243, 644843, 675263, 689789, 785801, 787601, 837667, 845381, 954263, 959389, 1070203
Offset: 1

Views

Author

Scott R. Shannon, Jan 07 2020

Keywords

Comments

This sequence lists the prime numbers that are prime-indexed primes, see A006450, and whose digit sum A007953, concatenation of adjacent digit sums A053392, and concatenation of adjacent digit differences A040115, are also primes. This is a subsequence of A006450 and A330653. There are 267 terms for primes up to 20491057.

Examples

			a(4) = 2063 as 2063 is the 311th prime, 2+0+6+3 = 11, '2+0'+'0+6'+'6+3' = 269, '|2-0|'+'|0-6|'+'|6-3|' = 263, and 2063, 311, 11, 269, 263 are all prime.
		

Crossrefs

A329527 The prime numbers that are prime-indexed primes and whose reversal, digit sum, sum of digits to their own power, adjacent digit sum concatenation, and adjacent digit difference concatenation are also primes.

Original entry on oeis.org

10180481, 11245547, 18486581, 35015063, 72042701, 72466367, 112823743, 113135621, 171199663, 304000381, 308486107, 318827167, 370257067, 382355443, 722948621, 731621629, 765348167, 771649421, 775786489, 776751581, 916132267, 963985829, 965521463, 980165701, 1002471581
Offset: 1

Views

Author

Scott R. Shannon, Jan 07 2020

Keywords

Comments

This sequence lists the prime numbers that are prime-indexed primes A006450, and whose digit reversal A004086, digit sum A007953, sum of digits to their own powers A045503, concatenation of adjacent digit sums A053392, and concatenation of adjacent digit differences A040115, are also primes. This is a subsequence of A006450 and A331031. Note that, as in A045503, we assume 0^0 = 1. There are only three entries for primes up to 20491057.

Examples

			a(1) = 10180481, as 10180481 is the 675797th prime, 10180481 in reversal is 18408101, 1+0+1+8+0+4+8+1=23, 1^1+0^0+1^1+8^8+0^0+4^4+8^8+1^1=33554693, '1+0'+'0+1'+'1+8'+'8+0'+'0+4'+'4+8'+'8+1'=11984129, '|1-0|'+'|0-1|'+'|1-8|'+'|8-0|'+'|0-4|'+'|4-8|'+'|8-1|'=1178447, and 10180481, 675797, 18408101, 23, 33554693, 11984129, 1178447 are all prime.
		

Crossrefs

Extensions

Terms a(4) and beyond from Giovanni Resta, Jan 08 2020
Previous Showing 11-20 of 21 results. Next