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

A327270 The minimum number such that the concatenation of the absolute values of differences between adjacent digits of a(n) is n. Values of n which have no such a(n) are given as -1.

Original entry on oeis.org

10, 13, 14, 15, 16, 17, 18, 19, 90, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 133, 132, 131, 130, 137, 138, 139, 207, 208, 209, 144, 143, 142, 141, 140, 149, 306, 307, 308, 309, 155, 154, 153, 152, 151, 150, 260, 370, 408, 409, 166, 165, 164, 163, 162, 161, 160, 270
Offset: 1

Views

Author

Scott R. Shannon, Nov 29 2019

Keywords

Comments

This sequence gives the minimum value such that the concatenation of the absolute value of the differences between its adjacent digits give n. Some values of n have no ancestor, see A271639. These are given the value -1 in this sequence.

Examples

			a(1) = 10 as |1 - 0| = 1, and 10 is the smallest such number.
a(9) = 90 as |9 - 0| = 9, and 90 is the smallest such number
a(10) = 100 as |1 - 0| = 1, and |0 - 0| = 0, giving a concatenation of 10. 100 is the smallest such number.
a(48) = 408 as |4 - 0| = 4 and |0 - 8| = 8, giving a concatenation of 48. 408 is the smallest such number.
		

Crossrefs

Programs

  • Mathematica
    max = 60; seq = Table[-1, {max}]; count = 0; n = 1; While[count < max && n <= 10^(1 + Ceiling[Log10[max]]), index = FromDigits @ Abs @ Differences @ IntegerDigits[n]; If[index <= max && seq[[index]] < 0, count++; seq[[index]] = n]; n++]; seq (* Amiram Eldar, Nov 29 2019 *)
  • PARI
    A327270(n)={
      my(v=if(!n, [0], digits(n)));
      my(recurse(k,c) = if(k>#v, c, my(d=v[k],r=-1);
           if(d<=c, r=self()(k+1,c-d));
           if(r<0 && c+d<=9, r=self()(k+1,c+d));
           if(r<0, -1, r+10^(#v+1-k)*c)) );
      my(r=-1, c=1); while(r<0&&c<=9, r=recurse(1,c); c++); r
    } \\ Andrew Howroyd, Dec 10 2024

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

A120279 a(n) = Sum[Sum[(i+j)!/i!/j!,{i,1,j}],{j,1,n}].

Original entry on oeis.org

2, 11, 45, 170, 631, 2346, 8780, 33089, 125466, 478181, 1830258, 7030557, 27088856, 104647615, 405187809, 1571990918, 6109558567, 23782190466, 92705454875, 361834392094, 1413883873953, 5530599237752, 21654401079301, 84859704298176
Offset: 1

Views

Author

Alexander Adamchuk, Jul 05 2006

Keywords

Comments

p divides a(p-1) and a(p-2) for prime p=5,11,17,23,29,41,47,53,59,71..=A007528[n] Primes of form 6n-1.
p divides a([(2p-1)/2]) for prime p=5,11,17,23,29,41,47,53,59,71..=A007528[n] Primes of form 6n-1.
p divides a((p-5)/2) for prime p=17,29,41,53,89,101.. =A040115[n] Primes of form 12n+5. Primes congruent to 5 (mod 12) excluding 5.
p divides a((p-5)/3) for prime p=11,17,23,29,41,47,53,59,71..=A007528[n] Primes of form 6n-1 excluding 5.
p divides a([(p-3)/3]) for prime p=11,17,23,29,41,47,53,59,71..=A007528[n] Primes of form 6n-1 excluding 5.

Crossrefs

Programs

  • Mathematica
    Table[Sum[Sum[(i+j)!/i!/j!,{i,1,j}],{j,1,n}],{n,1,50}]

Formula

a(n) = Sum[Sum[(i+j)!/i!/j!,{i,1,j}],{j,1,n}]. a(n) = A079309(n+1) - (n+1). a(n) = A066796(n+1)/2 - (n+1).
Recurrence: (n+1)*(3*n-2)*a(n) = 6*(3*n^2-1)*a(n-1) - 3*(9*n^2-n-2)*a(n-2) + 2*(2*n-1)*(3*n+1)*a(n-3). - Vaclav Kotesovec, Oct 19 2012
a(n) ~ 2^(2*n+3)/(3*sqrt(Pi*n)). - Vaclav Kotesovec, Oct 19 2012
a(n) = Sum_{k=1..n} Sum_{i=1..k} C(k+i,i). - Wesley Ivan Hurt, Sep 19 2017

A329340 Size of the orbit of n under "ghost iterations" A329201 (rule B).

Original entry on oeis.org

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

Views

Author

M. F. Hasler, Nov 11 2019

Keywords

Comments

Or: Number of iterations of A329201 until a number is seen for the second time in the trajectory of n.
A329201 consists of subtracting from or adding to n, depending on whether it is even or odd, the number A040115(n) whose digits are the differences of adjacent digits of n.
The trajectory of all numbers < 8000 ends in a repdigit (A010785), which are fixed points of this map. Some larger numbers enter nontrivial cycles, cf. A329342. In both cases, some number(s) will appear infinitely often in the trajectory. This sequence gives the number of iterations until a value is repeated for the first time in the trajectory of n. This is also the size of n's orbit, i.e. the total number of distinct values that will occur.
If n is part of a cycle (n in A329342), a(n) gives the length of the cycle; in particular a(n) = 1 for fixed points.
For 11 <= n <= 99 the pattern ( 1, 3, 2, 3, 2, 3, 2, 4, 2, 5, 2) of length 11 repeats. But the trajectory of those n with same a(n) does not always end in the corresponding repdigit.

Examples

			For repdigits A010785 and in particular single-digit numbers, {0, 1, ..., 9, 11, 22, ...}, A329201(n) = n, so O(n) = {n} and a(n) = 1.
For others we have:
10 -> 11, so a(10) = #{10, 11} = 2.
12 -> 13 -> 11, so a(10) = #{12, 13, 11} = 2. Also 23 -> 24 -> 22, so a(23) = 3, and similarly for 34, 45, 56, 67 and 78. But 89 -> 90 -> 99, the next *larger* repdigit!
20 -> 18 -> 25 -> 28 -> 22, whence a(20) = 5. Similarly, 31 -> 29 -> 36 -> 39 -> 33, a(31) = 5, too. But 42 -> 40 -> 36 -> 39 -> 33 goes to the next *lower* repdigit, yet still has a(42) = 5.
		

Crossrefs

Cf. A329201, A329197 (analog for A329200), A329342 (list of cycles), A329341 (length of cycles), A329196, A329197 (cycles for A329200).

Programs

  • PARI
    apply( A329340(n,M=oo,U=[n])={for(k=1,M,setsearch(U,n=A329201(n))&&return(k); U=setunion(U,[n]))}, [0..122])

Formula

a(n) = 1 <=> n is a fixed point of A329201 <=> n is a repdigit number (A010785).
a(n) = a(n') if 11 <= n, n' <= 99 and n == n' (mod 11).
a(n) = # orbit(n) where orbit(n) = { (A329201^k)(n); k >= 0 }.

A329341 Length of nontrivial cycles under the ghost iteration A329201, as listed in the table A329342.

Original entry on oeis.org

3, 7, 3, 6, 5, 3, 3, 6, 9, 12, 5, 3, 3, 3, 3, 6, 3, 5, 4, 3, 3, 3, 3, 3, 6, 3, 5, 4, 11, 3, 3, 3, 3, 17, 3, 3, 6, 3, 3, 5, 11
Offset: 1

Views

Author

M. F. Hasler, Nov 10 2019

Keywords

Comments

A329201 consists of adding or subtracting the number A040115(n) whose digits are the difference between adjacent digits of n, depending on its parity. Repdigits A010785 are fixed points of this map, but some numbers enter nontrivial cycles. Sequence A329342 lists these cycles, ordered by their smallest member which is always listed first. This sequence gives the row lengths.

Examples

			a(1) = 3 is the length of the first cycle, (8290, 8969, 9102).
a(2) = 7 is the length of the next cycle, (17998,  24199,  21819,  20041,  22084,  21800, 20020).
a(3) = 3 = a(7) is the length of all members of the family starting with (21901, 23792, 25219) and continued by duplicating the initial digit of each term.
a(4) = 6 = a(8) is the length of all members of the family starting with (54503,  55656,  55767,  55978,  56399,  55039), extended as above.
a(5) = 5 = a(11) is the length of all members of the family starting with (87290,  88869,  88892,  88909,  89108), extended as above.
		

Crossrefs

Cf. A329342 (table of cycles), A329201, A329197 (analog for A329200), A329198.

Extensions

a(12) - a(41) from Scott R. Shannon, Nov 12 2019

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

A330159 The self-repeating start values of the iterative sequence A328680.

Original entry on oeis.org

91711, 91712, 141691, 151481, 161271, 271161, 1310812, 5020232, 10117443, 11552816, 14118522, 14149412, 14821815, 31410828, 35523710, 41113743, 46211402, 84404483, 91186117
Offset: 1

Views

Author

Scott R. Shannon, Dec 03 2019

Keywords

Comments

This sequences lists the self-repeating starting values n for the iterative sequence defined in A328680 up to starting values of n = 10^8. Each number in this sequence, when acting as the starting value for the A328680 iteration, will be the first number repeated in the iteration. Note that the other numbers appearing in the iterative sequence for a given start value n will in general NOT be other entries of this sequence as the iteration depends critically on the start value of n itself. As can be seen these numbers are quite rare, there being only 19 entries for n up to 100 million. It is unknown if this is a finite or infinite sequence.

Examples

			91711 is in the sequence as A040115(91711) = 8660, A053392(8660) = 14126, A053392(14126) = 5538, A053392(5538) = 10811, A053392(10811) = 1892, A053392(1892) = 91711, repeating the starting value 91711.
		

Crossrefs

Previous Showing 21-30 of 31 results. Next