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.

User: Ivan Stoykov

Ivan Stoykov's wiki page.

Ivan Stoykov has authored 7 sequences.

A358348 Numbers k such that k == k^k (mod 9).

Original entry on oeis.org

1, 4, 7, 9, 10, 13, 16, 17, 18, 19, 22, 25, 27, 28, 31, 34, 35, 36, 37, 40, 43, 45, 46, 49, 52, 53, 54, 55, 58, 61, 63, 64, 67, 70, 71, 72, 73, 76, 79, 81, 82, 85, 88, 89, 90, 91, 94, 97, 99, 100, 103, 106, 107, 108, 109, 112, 115, 117, 118, 121, 124, 125, 126
Offset: 1

Author

Ivan Stoykov, Nov 11 2022

Keywords

Comments

Each multiple of 9 is in the sequence. Additionally, the squares are also present.

Examples

			4 is a term since 4^4 = 256 == 4 (mod 9).
		

References

  • M. Fujiwara and Y. Ogawa, Introduction to Truly Beautiful Mathematics. Tokyo: Chikuma Shobo, 2005.

Crossrefs

Programs

  • Maple
    A358348 := proc(n)
        2*(n+1)-op(modp(n,9)+1,[2,3,2,1,1,2,1,0,1]) ;
    end proc:
    seq(A358348(n),n=1..50) ; # R. J. Mathar, Mar 29 2023
  • Mathematica
    Select[Range[130], MemberQ[{0, 1, 4, 7, 9, 10, 13, 16, 17}, Mod[#, 18]] &] (* Amiram Eldar, Nov 12 2022 *)
  • PARI
    isok(k) = k == Mod(k,9)^k; \\ Michel Marcus, Nov 22 2022
    
  • Python
    def A358348(n):
        return ((0, 1, 4, 7, 9, 10, 13, 16, 17)[m := n % 9]
             + (n - m << 1))  # Chai Wah Wu, Feb 09 2023

Formula

G.f.: x*(x+1)*(x^7+3*x^5+x^3+x^2+2*x+1)/((1-x)^2*(1+x^3+x^6)*(1+x+x^2)). - Alois P. Heinz, Feb 08 2023
a(n) = 2*(n+1) - b(n) where b(n>=0) = 2,3,2,1,1,2,1,0,1,2,3,2,... has period 9. - Kevin Ryde, Mar 26 2023

A333448 Smallest positive divisibility coefficient of A045572(n).

Original entry on oeis.org

1, 1, 5, 1, 10, 4, 12, 2, 19, 7, 19, 3, 28, 10, 26, 4, 37, 13, 33, 5, 46, 16, 40, 6, 55, 19, 47, 7, 64, 22, 54, 8, 73, 25, 61, 9, 82, 28, 68, 10, 91, 31, 75, 11, 100, 34, 82, 12, 109, 37, 89, 13, 118, 40, 96, 14, 127, 43, 103, 15, 136, 46, 110, 16, 145, 49, 117
Offset: 1

Author

Ivan Stoykov, Mar 21 2020

Keywords

Comments

The sequence was generated in an attempt to create a universal divisibility test. Namely, taking the last digit of the number inspected, multiplying it by a number (the "divisibility coefficient"), and adding it to the inspected number without the last digit. Then, if the result is divisible by the number we are checking, so is our original number. This test works only for numbers coprime to 10, hence the sequence is based on A045572. The sequence lists the smallest positive divisibility coefficients of the members of A045572.
a(n) may equivalently be defined as the multiplicative inverse of 10 modulo A045572(n). - Ely Golden, Mar 27 2024

Examples

			For example, let us check whether 21 is divisible by 7. First, we take off the last digit, 1. Since 7 is the third member of A045572, its divisibility coefficient is the third member of this sequence, namely 5. Then we multiply 5 times 1 to obtain 5, and we add it to the original number without the last digit, in our case, 2. We get 7, and since it is clearly divisible by 7, so is 21.
		

Crossrefs

Cf. A045572.

Programs

  • Mathematica
    Array[# - (# Mod[PowerMod[#, 3, 10], 10] - 1)/10 &[1/2*(5*# + Mod[3*# + 2, 4] - 4)] &, 67] (* Michael De Vlieger, Oct 05 2020 *)
  • PARI
    lista(nn) = {for (n=1, nn, if (gcd(n,10) == 1, my(m=n % 10, k=n\10, x); if (m == 1, x = 9*k+1); if (m == 3, x = 3*k+1); if (m == 7, x = 7*k+5); if (m == 9, x = k+1); print1(x, ", ");););} \\ Michel Marcus, May 04 2020
    
  • Python
    def a(n):
        u = 10*((n-1) // 4) + [1, 3, 7, 9][(n-1) % 4]
        return pow(10, -1, u) + (u == 1)
    print(*(a(i) for i in range(1,101)), sep=", ")
    # Ely Golden, Mar 27 2024

Formula

The sequence can be defined piecewise: 9m+1 for numbers of the form 10m+1; 3m+1 for numbers of the form 10m+3; 7m+5 for numbers of the form 10m+7 and m+1 for numbers of the form 10m+9.
From Lorenzo Sauras Altuzarra, Sep 29 2020: (Start)
a(n) = 1/10 - (1 - 2*(floor((n + 1)/4) + n))*(1 - (1 + (floor(16*9^n/205) mod 9))/10).
a(n) = b(n) - (((b(n) mod 10)^3 mod 10)*b(n) - 1)/10, where b(n) = A045572(n). (End)

Extensions

More terms from Michel Marcus, May 04 2020

A306583 Positive integers that cannot be represented as a sum or difference of factorials of distinct integers.

Original entry on oeis.org

11, 12, 13, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 107, 108, 109, 131, 132, 133, 155, 156, 157
Offset: 1

Author

Ivan Stoykov, Feb 25 2019

Keywords

Comments

It can be proved that any number in the gap between n! + (n-1)! + (n-2)! + ... + 2! + 1! + 0! and (n+1)! - (n! + (n-1)! + (n-2)! + ... + 2! + 1! + 0!) is in this sequence.
0! and 1! are treated as distinct. - Bernard Schott, Feb 25 2019

Examples

			10 can be represented as 10 = 0! + 1! + 2! + 3!, so it is not a term.
11 cannot be represented as a sum or a difference of factorials, so it is a term.
		

Crossrefs

Cf. A000142 and A007489.
Cf. A059589 (Sums of factorials of distinct integers with 0! and 1! treated as distinct), A059590 (Sums of factorials of distinct integers with 0! and 1! treated as identical), A005165 (Alternating factorials).

Programs

  • Mathematica
    Complement[Range[160], Total[# Range[0, 5]!] & /@ (IntegerDigits[ Range[3^6 - 1], 3, 6] - 1)] (* Giovanni Resta, Feb 27 2019 *)

Extensions

More terms from Giovanni Resta, Feb 27 2019

A322406 a(n) = n + n*n^n.

Original entry on oeis.org

2, 10, 84, 1028, 15630, 279942, 5764808, 134217736, 3486784410, 100000000010, 3138428376732, 106993205379084, 3937376385699302, 155568095557812238, 6568408355712890640, 295147905179352825872, 14063084452067724991026, 708235345355337676357650, 37589973457545958193355620
Offset: 1

Author

Ivan Stoykov, Dec 07 2018

Keywords

Comments

All terms are produced by successively applying the three basic operations: exponentiation, multiplication and addition.

Examples

			a(3) = 3 + 3*3^3 = 3 + 3*27 = 8 + 81 = 84.
		

Crossrefs

Equals 2 * A108398.

Programs

Formula

E.g.f.: exp(x) * x - LambertW(-x)/(1 + LambertW(-x))^3. - Vaclav Kotesovec, Dec 20 2018

Extensions

a(12)-a(19) from Stefano Spezia, Dec 07 2018

A321970 Numbers k such that 7^k ends with k.

Original entry on oeis.org

3, 43, 343, 2343, 72343, 172343, 5172343, 65172343, 565172343, 1565172343, 11565172343, 511565172343, 5511565172343, 65511565172343, 265511565172343, 1265511565172343, 31265511565172343, 331265511565172343, 3331265511565172343, 43331265511565172343
Offset: 1

Author

Ivan Stoykov, Nov 26 2018

Keywords

Comments

Leftmost digit of a(n) is A133617(n-1) for n <= 30. - Alois P. Heinz, Nov 26 2018

Examples

			7^3 = 343, and it ends with 3, so 3 is a term.
		

Crossrefs

Cf. A133617.
Sequence A064541 is similar, but uses the smallest single-digit prime as a base, unlike this one, which uses the largest single-digit prime as a base.

Programs

  • Mathematica
    a[1] = 3; a[n_] := a[n] = For[ida = IntegerDigits[a[n-1]]; k = 1, True, k++, idk = IntegerDigits[k]; pm = PowerMod[7, an = FromDigits[Join[idk, ida]], 10^IntegerLength[an]]; If[pm == an, Return[an]]]; Array[a, 20] (* after Jean-François Alcover in A064541 *)

A321771 Numbers whose digit product equals the number of their digits.

Original entry on oeis.org

1, 12, 21, 113, 131, 311, 1114, 1122, 1141, 1212, 1221, 1411, 2112, 2121, 2211, 4111, 11115, 11151, 11511, 15111, 51111, 111116, 111123, 111132, 111161, 111213, 111231, 111312, 111321, 111611, 112113, 112131, 112311, 113112, 113121, 113211, 116111, 121113
Offset: 1

Author

Ivan Stoykov, Nov 21 2018

Keywords

Comments

Idea is similar to A061384, which uses addition instead of multiplication.

Examples

			12 has two digits, and their product is also 2, as 1*2=2.
		

Crossrefs

Cf. A061384.
Cf. A007954, A055642. Subsequence of A007602.
Subsequence of A052382 (zeroless numbers).

Programs

  • Mathematica
    Select[Range[1000000], Length[IntegerDigits[#]] == Times @@ IntegerDigits[#] &] (* Amiram Eldar, Nov 21 2018 *)
  • PARI
    isok(n) = my(d=digits(n)); vecprod(d) == #d; \\ Michel Marcus, Nov 22 2018

Extensions

More terms from Amiram Eldar, Nov 21 2018

A306014 Numbers k such that A055228(k)^2 - A055228(k) is a multiple of k, where A055228(k) is ceiling(sqrt(k!)).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 14, 16, 28, 29, 30, 42, 46, 50, 52, 99, 134, 148, 165, 205, 245, 249, 315, 390, 441, 461, 525, 560, 763, 962, 1596, 1666, 1716, 1847, 1854, 1860, 3515, 4501, 5179, 6850, 7345, 7867, 8940, 9491, 9523, 15688, 19988, 23574, 23956
Offset: 1

Author

Ivan Stoykov, Jun 17 2018

Keywords

Examples

			For k=6, A055228(6) = ceiling(sqrt(6!)) = 27, and 27^2-27 = 702, which is a multiple of 6.
		

References

  • Hazewinkel, Michiel, ed. (2001) [1994], Gamma Function, Encyclopedia of Mathematics, Springer Science+Business Media B.V. / Kluwer Academic Publishers, ISBN 978-1-55608-010-4

Crossrefs

Programs

  • Mathematica
    Select[Range[4600],Divisible[Ceiling[Sqrt[#!]]^2-Ceiling[Sqrt[#!]],#]&] (* Harvey P. Dale, Mar 02 2023 *)
  • PARI
    default(realprecision,10^5); for(n=1,10^4, if( Mod( ceil(sqrt(n!)) - ceil(sqrt(n!))^2 , n) == 0, print1(n,", "))); \\ Joerg Arndt, Jun 17 2018

Extensions

Terms > 99 from Joerg Arndt, Jun 17 2018