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 31-36 of 36 results.

A367733 Numbers k such that the sum of digits of k is equal to the sum of digits of k+9.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 76, 77, 78, 79, 81, 82, 83, 84, 85, 86, 87, 88, 89, 101
Offset: 1

Views

Author

Julia Zimmerman, Nov 28 2023

Keywords

Comments

Numbers k which end in the digits ...xy with x!=9 and y!=0.
Differs from A052382, as there are terms with 0 here, the first being a(82)=101. First differs from A067251 at a(82)=101, A067251(82)=91. Similarly to A067251, A209931 includes 91-99 as terms whereas they are not in this sequence. A043095(1)=0 and A023804(1)=0 whereas 0 is not a term in this sequence (there are additional differences, such as the term that comes after 89 in A023804 and A043095 being 99).
This sequence is defined as follows: |digsum(k + seed) - digsum(k)| = r where digsum is the digital sum (A007953), with seed = 9 and r = 0.
The way this sequence looks has to do with using base 10: if you choose 8 as a seed and 1 as the sought difference (r), or 7 as a seed and 2 as the sought difference, you will get similar long, full sequences. However if you choose 8 as a seed and 0 as the sought difference, you'll get no terms.

Examples

			For k=3, 3 + 9 = 12. Sum of 1 + 2 = 3. Since the sum of the digits in 3 and the sum of the digits in 12 are the same, 3 is a term of the sequence.
		

Crossrefs

Cf. A007953.

Programs

  • Mathematica
    Select[Range[100], Equal @@ Plus @@@ IntegerDigits[{#, # + 9}] &] (* Amiram Eldar, Nov 28 2023 *)
  • PARI
    is(n) = sumdigits(n) == sumdigits(n+9) \\ David A. Corneth, Nov 28 2023
  • Python
    def A367733(n): return n + (n-1)//9 + ((n-1)//81)*10
    

Formula

a(n) = n + floor((n-1)/9) + floor((n-1)/81)*10.

A368397 a(n) is the least number k not ending in 0 such that k^n has at least n 0's in its decimal expansion.

Original entry on oeis.org

101, 101, 101, 101, 101, 351, 518, 194, 1001, 951, 3231, 3757, 2169, 999, 1397, 2273, 9723, 8683, 13219, 6152, 15204, 18898, 39484, 10001, 10001, 35586, 46564, 35085, 71061, 100001, 43055, 43642, 83055, 44411, 36802, 94501, 135852, 52299, 174062, 121201, 173388, 119032, 215365, 94996, 201312
Offset: 1

Views

Author

Robert Israel, Dec 22 2023

Keywords

Examples

			a(6) = 351 because 351^6 = 1870004703089601 has 6 0's, and this is the smallest number not ending in 0 that works.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local k;
      for k from 2 do
        if k mod 10 <> 0 and numboccur(0, convert(k^n,base,10)) >= n then return k fi
      od
    end proc:
    map(f, [$1..50]);
  • Mathematica
    a={}; For[n=1, n<=45, n++, k=1; While[Mod[k,10]==0 || Count[IntegerDigits[k^n,10],0] < n, k++]; AppendTo[a,k]]; a (* Stefano Spezia, Dec 22 2023 *)
  • PARI
    a(n) = {
    	forstep(i = 11, oo, [1,1,1,1,1,1,1,1,2],
    		d = digits(i^n);	
    		t = 0;
    		for(j = 1, #d,
    			t+=(!d[j])
    		);
    		if(t >= n,
    			return(i)
    		)
    	)
    } \\ David A. Corneth, Dec 22 2023
    
  • Python
    from gmpy2 import digits
    from itertools import count
    def a(n): return next(k for k in count(1) if k%10 and digits(k**n).count('0')>=n)
    print([a(n) for n in range(1, 46)]) # Michael S. Branicky, Jan 05 2024

A371031 Number of distinct integers resulting from adding an n-digit non-multiple of 10 and its reverse.

Original entry on oeis.org

9, 17, 170, 323, 3230, 6137, 61370, 116603, 1166030, 2215457
Offset: 1

Views

Author

César Eliud Lozada, Mar 08 2024

Keywords

Examples

			For n=2 there are 81 2-digit numbers not ending with 0: {11, 12, 13, ..., 99}. There are 17 distinct results when adding each of these to their reversal: {22, 33, 44, 55, 66, 77, 88, 99, 110, 121, 132, 143, 154, 165, 176, 187, 198}. Therefore a(2) = 17.
		

Crossrefs

Programs

  • Mathematica
    A371031[n_] :=
    Module[{nn, ss},
      nn = Select[Range[If[n == 1, 1, 10^(n - 1) + 1], 10^n - 1], Mod[#, 10] > 0 &];
      ss = Map[# + FromDigits[Reverse[IntegerDigits[#]]] &, nn];
      Return[CountDistinct[ss]]
    ];
    Map[A371031[#]&, Range[7]]

Formula

For n > 1, empirically a(n+1) = 10 a(n) if n even, 19 a(n) / 10 if n odd, and thus a(n+2) = 19 a(n). - Michael S. Branicky, Mar 31 2024

Extensions

a(9)-a(10) from Michael S. Branicky, Mar 30 2024

A066741 Pentagonal numbers not divisible by 10 whose reverse is a square.

Original entry on oeis.org

0, 1, 925, 1426, 6112, 9801, 140301, 52244922262, 1445531162626, 5205252778462, 63253297234426, 9040940929621480310251
Offset: 1

Views

Author

Erich Friedman, Jan 16 2002

Keywords

Comments

a(13) > 2^63. - Donovan Johnson, May 24 2011

Examples

			925 is pentagonal and 529 is square.
		

Crossrefs

Programs

  • Mathematica
    dtn[L_] := Fold[10#1+#2&, 0, L] A={0}; For[i=1, i>0, i++, t=i(3i-1)/2; r=dtn[Reverse[IntegerDigits[t]]]; If[IntegerQ[Sqrt[r]]&&Mod[t, 10]>0, AppendTo[A, t]; Print[A]]]

Extensions

a(12) from Donovan Johnson, Apr 03 2008
Offset corrected by Donovan Johnson, May 24 2011
Description clarified and a(12) corrected by Lars Blomberg, May 29 2011

A320523 Smallest m > 1 such that either n^m == n (mod 25) or n^m == 0 (mod 25).

Original entry on oeis.org

2, 21, 21, 11, 2, 6, 5, 21, 11, 2, 6, 21, 21, 11, 2, 6, 21, 5, 11, 2, 6, 21, 21, 3, 2, 2, 21, 21, 11, 2, 6, 5, 21, 11, 2, 6, 21, 21, 11, 2, 6, 21, 5, 11, 2, 6, 21, 21, 3, 2, 2, 21, 21, 11, 2, 6, 5, 21, 11, 2, 6, 21, 21, 11, 2, 6, 21, 5, 11, 2, 6, 21, 21, 3, 2
Offset: 1

Views

Author

Marco Ripà, Oct 14 2018

Keywords

Comments

This is a periodic sequence. In fact, a(n) (mod 25) == a(n + k*25) (mod 25), for any k >= 0. The maximum value of a(n) is 21 = lambda(25) + 1 = 20 + 1, since 20 is the Carmichael's lambda value in 25.
This sequence, omitting a(n = 10*k), predicts the convergence speed of any tetration a^^b, for any b >= a > 2, since A317905(n) = 1 iff a(n) > 5 and A317905(n) >= 2 otherwise (for any 2 <= a(n) <= 5).

Examples

			For n = 41, a(41) = a(16) = 6, since 16^6 mod 25 = 16.
		

References

  • M. Ripà, La strana coda della serie n^n^...^n, Trento, UNI Service, Nov 2011. ISBN 978-88-6178-789-6.

Crossrefs

Programs

  • Mathematica
    With[{k = 25}, Table[If[Mod[n, 5] == 0, 2, SelectFirst[Range[2, CarmichaelLambda@ k + 1], PowerMod[n, #, k] == Mod[n, k] &]], {n, 75}]] (* Michael De Vlieger, Oct 15 2018 *)
  • PARI
    a(n) = {my(m=2); while ((Mod(n, 25)^m != n) && (Mod(n, 25)^m != 0), m++); m;} \\ Michel Marcus, Oct 16 2018

Formula

For any k >= 0,
a( 1 + k*25) = 2;
a( 2 + k*25) = 21;
a( 3 + k*25) = 21;
a( 4 + k*25) = 11;
a( 5 + k*25) = 2;
a( 6 + k*25) = 6;
a( 7 + k*25) = 5;
a( 8 + k*25) = 21;
a( 9 + k*25) = 11;
a(10 + k*25) = 2;
a(11 + k*25) = 6;
a(12 + k*25) = 21;
a(13 + k*25) = 21;
a(14 + k*25) = 11;
a(15 + k*25) = 2;
a(16 + k*25) = 6;
a(17 + k*25) = 21;
a(18 + k*25) = 5;
a(19 + k*25) = 11;
a(20 + k*25) = 2;
a(21 + k*25) = 6;
a(22 + k*25) = 21;
a(23 + k*25) = 21;
a(24 + k*25) = 3;
a(25*(k + 1))= 2.

A327723 a(1) = 0. For n > 1, a(n) is the smallest positive integer k not already in the sequence such that the least significant digit of k equals the most significant digit of a(n-1).

Original entry on oeis.org

0, 10, 1, 11, 21, 2, 12, 31, 3, 13, 41, 4, 14, 51, 5, 15, 61, 6, 16, 71, 7, 17, 81, 8, 18, 91, 9, 19, 101, 111, 121, 131, 141, 151, 161, 171, 181, 191, 201, 22, 32, 23, 42, 24, 52, 25, 62, 26, 72, 27, 82, 28, 92, 29, 102, 211, 112, 221, 122, 231, 132, 241, 142
Offset: 1

Views

Author

Felix Fröhlich, Sep 24 2019

Keywords

Comments

Except for 0 and 10, there are no multiples of 10 (terms of A008592) in the sequence, i.e., any term of the sequence except 0 or 10 is a term of A067251.
Are there any numbers except multiples of 10 that do not occur in the sequence? In other words, is this a permutation of A067251 UNION [0, 10]?

Crossrefs

Programs

  • Mathematica
    L={0}; Do[k = IntegerDigits[ Last@ L][[1]]; While[ MemberQ[L,k], k+=10]; AppendTo[ L, k], {80}]; L (* Giovanni Resta, Sep 24 2019 *)
  • PARI
    isinv(vec, k) = for(t=1, #vec, if(vec[t]==k, return(1))); 0
    isvalid(x, y) = my(d=digits(x), e=digits(y)); d[#d]==e[1]
    terms(n) = my(v=[0, 10]); while(1, if(#v >= n, return(v)); for(k=1, oo, if(isvalid(k, v[#v]) && !isinv(v, k), v=concat(v, [k]); break)))
    terms(100) \\ Print initial 100 terms
    
  • Python
    n, a, msdc = 0, 0, [1,0,0,0,0,0,0,0,0,0]
    while n <= 62:
        print(n,a)
        s = str(a)
        msd = int(s[0])
        n, a = n+1, msdc[msd]*10+msd
        msdc[msd] = msdc[msd]+1 # A.H.M. Smeets, Sep 25 2019

Formula

A010879(a(n)) = A000030(a(n-1)).
Previous Showing 31-36 of 36 results.