Skip to main content
added 783 characters in body
Source Link
Unrelated String
  • 23k
  • 3
  • 32
  • 55

Jelly, 18 bytes

J:g¥Ƭ’}ṪU×ḷb§¥ƬṪS%

Try it online!

A less naive computation of the digital roots comes out a bit longer by having to special-case 0. Inverted output: truthy (nonzero) if the checksum fails.

J                     1-indices from the start
 :                    divided by
  g¥                  their GCDs with
     ’}               B - 1
    Ƭ  Ṫ              repeated while unique,
        U             reversed
         ×ḷ           times each N.
              ƬṪ      Loop while unique:
           b ¥        Convert each to base B
            §         and sum each.
                S     Sum
                 %    mod B.

A version which ties with an alternative to repeated division:

Jelly, 18 bytes

:gɓ’*
JçU×ḷb§¥ƬṪS%

Try it online!

ç is used to save 1 byte compared to an excessive combination of quicks in :g¥*@¥’} or :g¥’*¥@¥:

:        Divide the indices by
 g       their GCDs with
  ɓ’     B - 1
    *    raised to the power of each index.

No prime factor of any index has a multiplicity greater than that index, so it suffices to exponentiate B - 1 that many times.

Jelly, 18 bytes

J:g¥Ƭ’}ṪU×ḷb§¥ƬṪS%

Try it online!

A less naive computation of the digital roots comes out a bit longer by having to special-case 0. Inverted output: truthy (nonzero) if the checksum fails.

J                     1-indices from the start
 :                    divided by
  g¥                  their GCDs with
     ’}               B - 1
    Ƭ  Ṫ              repeated while unique,
        U             reversed
         ×ḷ           times each N.
              ƬṪ      Loop while unique:
           b ¥        Convert each to base B
            §         and sum each.
                S     Sum
                 %    mod B.

Jelly, 18 bytes

J:g¥Ƭ’}ṪU×ḷb§¥ƬṪS%

Try it online!

A less naive computation of the digital roots comes out a bit longer by having to special-case 0. Inverted output: truthy (nonzero) if the checksum fails.

J                     1-indices from the start
 :                    divided by
  g¥                  their GCDs with
     ’}               B - 1
    Ƭ  Ṫ              repeated while unique,
        U             reversed
         ×ḷ           times each N.
              ƬṪ      Loop while unique:
           b ¥        Convert each to base B
            §         and sum each.
                S     Sum
                 %    mod B.

A version which ties with an alternative to repeated division:

Jelly, 18 bytes

:gɓ’*
JçU×ḷb§¥ƬṪS%

Try it online!

ç is used to save 1 byte compared to an excessive combination of quicks in :g¥*@¥’} or :g¥’*¥@¥:

:        Divide the indices by
 g       their GCDs with
  ɓ’     B - 1
    *    raised to the power of each index.

No prime factor of any index has a multiplicity greater than that index, so it suffices to exponentiate B - 1 that many times.

Post Undeleted by Unrelated String
added 74 characters in body
Source Link
Unrelated String
  • 23k
  • 3
  • 32
  • 55

Jelly, 1618 bytes

J:g¥’g¥Ƭ’}U×ḷb§¥ƬṪS%ṪU×ḷb§¥ƬṪS%

Try it online!Try it online!

A less naive computation of the digital roots comes out a bit longer by having to special-case 0. Inverted output: truthy (nonzero) if the checksum fails.

J                     1-indices from the start
 :                    divided by
  g¥                  their GCDs with
     ’}               B - 1
    Ƭ  Ṫ              repeated while unique,
        U             reversed
         ×ḷ           times each N.
              ƬṪ      Loop while unique:
           b ¥        Convert each to base B
            §         and sum each.
                S     Sum
                 %    mod B.

Jelly, 16 bytes

J:g¥’}U×ḷb§¥ƬṪS%

Try it online!

A less naive computation of the digital roots comes out a bit longer by having to special-case 0. Inverted output: truthy (nonzero) if the checksum fails.

J                   1-indices from the start
 :                  divided by
  g¥                their GCDs with
    ’}              B - 1
      U             reversed
       ×ḷ           times each N.
            ƬṪ      Loop while unique:
         b ¥        Convert each to base B
          §         and sum each.
              S     Sum
               %    mod B.

Jelly, 18 bytes

J:g¥Ƭ’}ṪU×ḷb§¥ƬṪS%

Try it online!

A less naive computation of the digital roots comes out a bit longer by having to special-case 0. Inverted output: truthy (nonzero) if the checksum fails.

J                     1-indices from the start
 :                    divided by
  g¥                  their GCDs with
     ’}               B - 1
    Ƭ  Ṫ              repeated while unique,
        U             reversed
         ×ḷ           times each N.
              ƬṪ      Loop while unique:
           b ¥        Convert each to base B
            §         and sum each.
                S     Sum
                 %    mod B.
Post Deleted by Unrelated String
added 448 characters in body
Source Link
Unrelated String
  • 23k
  • 3
  • 32
  • 55

Jelly, 16 bytes

J:g¥’}U×ḷb§¥ƬṪS%

Try it online!

A less naive computation of the digital roots comes out a bit longer by having to special-case 0. Inverted output: truthy (nonzero) if the checksum fails.

J                   1-indices from the start
 :                  divided by
  g¥                their GCDs with
    ’}              B - 1
      U             reversed
       ×ḷ           times each N.
            ƬṪ      Loop while unique:
         b ¥        Convert each to base B
          §         and sum each.
              S     Sum
               %    mod B.

Jelly, 16 bytes

J:g¥’}U×ḷb§¥ƬṪS%

Try it online!

A less naive computation of the digital roots comes out a bit longer by having to special-case 0.

Jelly, 16 bytes

J:g¥’}U×ḷb§¥ƬṪS%

Try it online!

A less naive computation of the digital roots comes out a bit longer by having to special-case 0. Inverted output: truthy (nonzero) if the checksum fails.

J                   1-indices from the start
 :                  divided by
  g¥                their GCDs with
    ’}              B - 1
      U             reversed
       ×ḷ           times each N.
            ƬṪ      Loop while unique:
         b ¥        Convert each to base B
          §         and sum each.
              S     Sum
               %    mod B.
Source Link
Unrelated String
  • 23k
  • 3
  • 32
  • 55
Loading